I will use the cmake and ccmake. The autoconf/automake implementation was used directly inside the AMDiS source directory (i.e. the directory you get through svn). To use the CMake buildsystem, I recommend a different directory structure for building and compiling AMDiS. The script getamdis_cmake.sh, which can be found on
/home/joe/work/
, the AMDiS source directory is/home/joe/work/amdis/AMDiS
. To configure and compile AMDiS I recommend to create a directory/home/joe/work/amdis_build
and run
cd /home/joe/work/amdis_build
cmake -DCMAKE_INSTALL_PREFIX=${HOME}/programs/ ../amdis/AMDiS
make ; make install
The last command will install AMDiS to /home/joe/programs fast and simple configuration configuration with options If you only want to build with standard options, you can simply run
project(projectName)
cmake_minimum_required(VERSION 2.8)
find_package(AMDiS REQUIRED)
if(AMDiS_FOUND)
include(${AMDiS_USE_FILE})
add_executable(fooProg src/foo.cc)
target_link_libraries(fooProg ${AMDiS_LIBRARIES})
endif(AMDiS_FOUND)
project(projectName)
cmake_minimum_required(VERSION 2.8)
find_package(AMDiS REQUIRED)
tells cmake, that you want to use AMDiS and it should complain if AMDiS was not found. CMake will print an error message, bu will not stop the execution! With the commandinclude(${AMDiS_USE_FILE})
we read an AMDiS specific configuration file, which sets some compilerflags and adds the include directorys. The program is added withadd_executable(fooProg src/foo.cc)
and we have to tell cmake, that we need the library amdis and each library amdis depends on. This is done with the commandtarget_link_libraries(fooProg ${AMDiS_LIBRARIES})
If cmake does not find AMDiS, you have to set the variable AMDIS_DIR to the directory containing the file AMDiSConfig.cmake. This file resides in$CMAKE_INSTALL_PREFIX/share/amdis/