- ==============================================
+ ==================================================
The cmake build system for the deal.II project
- ==============================================
+ ==================================================
- Author: maier, 2012
+ Author: Matthias Maier, University Heidelberg 2012
$ mkdir build
$ cd build
$ cmake -DCMAKE_INSTALL_PREFIX=/path/install/dir ../
- $ make
$ make install
( $ cd build )
$ cmake -D<OPTION>=<VALUE> [...] path/to/source/tree
+* Configure with autodetection, afterwards disable a feature:
+
+ ( $ cd build )
+ $ cmake -DDEAL_II_FEATURE_AUTODETECTION=ON ../
+ $ cmake -DDEAL_II_FEATURE_AUTODETECTION=OFF -DDEAL_II_WITH_METIS=OFF ../
+ $ make install
* Build and install only a specific component:
- $ cd build
+ ( $ cd build )
$ make <component>
$ cmake -DCOMPONENT=<component> -P build/cmake_install.cmake
${DEAL_II_INCLUDE_DIRS}
)
+
+ #
+ # Add an rpath directive so that libraries outside of the default search
+ # directories will be found by the runtime dynamic linker:
+ #
+ FOREACH(lib ${DEAL_II_EXTERNAL_LIBRARIES} ${DEAL_II_LIBRARIES})
+ GET_FILENAME_COMPONENT(path ${lib} PATH)
+ LIST(APPEND MAKEFILE_LDFLAGS "-Wl,-rpath -Wl,${path}")
+ ENDFOREACH()
+ LIST(REMOVE_DUPLICATES MAKEFILE_LDFLAGS)
+ TO_STRING(MAKEFILE_LDFLAGS ${MAKEFILE_LDFLAGS})
+ SET(MAKEFILE_LDFLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${MAKEFILE_LDFLAGS}")
+
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/Make.global_options.in
${CMAKE_CURRENT_BINARY_DIR}/Make.global_options.${CMAKE_BUILD_TYPE}