diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2009-09-27 17:48:53 -0400 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2009-09-27 17:48:53 -0400 |
commit | 92480ffd265475a25070b8ea9dfbc8536d038378 (patch) | |
tree | 2beb82f3c944172e3c713b4ccdeb70cbea84f23d /CMakeLists.txt | |
parent | 6b23cb210144683351f94d43c99106b71ce8393d (diff) |
* Introduce make targets btest (build tests), blas (build blas lib), demos (build demos).
* remove EIGEN_BUILD_TESTS and siblings
* add summary at the end of cmake run, hopefully not too verbose
* fix build of quaternion demo
* kill remnants of old binary library option
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 44 |
1 files changed, 20 insertions, 24 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 94b2e99d0..be76903e6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,20 +33,11 @@ include(CheckCXXCompilerFlag) set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) -option(EIGEN_BUILD_TESTS "Build tests" OFF) -option(EIGEN_BUILD_DEMOS "Build demos" OFF) -if(NOT WIN32) - option(EIGEN_BUILD_LIB "Build the binary shared library" OFF) -endif(NOT WIN32) option(EIGEN_BUILD_BTL "Build benchmark suite" OFF) if(NOT WIN32) option(EIGEN_BUILD_PKGCONFIG "Build pkg-config .pc file for Eigen" ON) endif(NOT WIN32) -if(EIGEN_BUILD_LIB) - option(EIGEN_TEST_LIB "Build the unit tests using the library (disable -pedantic)" OFF) -endif(EIGEN_BUILD_LIB) - set(CMAKE_INCLUDE_CURRENT_DIR ON) if(CMAKE_COMPILER_IS_GNUCXX) @@ -129,27 +120,32 @@ endif(EIGEN_BUILD_PKGCONFIG) add_subdirectory(Eigen) -add_subdirectory(doc) +add_subdirectory(doc EXCLUDE_FROM_ALL) -if(EIGEN_BUILD_TESTS) - include(CTest) - add_subdirectory(test) -endif(EIGEN_BUILD_TESTS) +include(CTest) +enable_testing() # must be called from the root CMakeLists, see man page +add_subdirectory(test EXCLUDE_FROM_ALL) add_subdirectory(unsupported) -if(EIGEN_BUILD_DEMOS) - add_subdirectory(demos) -endif(EIGEN_BUILD_DEMOS) +add_subdirectory(demos EXCLUDE_FROM_ALL) -if(EIGEN_BUILD_BLAS) - add_subdirectory(blas) -endif(EIGEN_BUILD_BLAS) +add_subdirectory(blas EXCLUDE_FROM_ALL) +# TODO: consider also replacing EIGEN_BUILD_BTL by a custom target "make btl"? if(EIGEN_BUILD_BTL) - add_subdirectory(bench/btl) + add_subdirectory(bench/btl EXCLUDE_FROM_ALL) endif(EIGEN_BUILD_BTL) -if(EIGEN_BUILD_TESTS) - ei_testing_print_summary() -endif(EIGEN_BUILD_TESTS) +ei_testing_print_summary() +message("You can now do the following:") +message("Command | Description") +message("-------------+------------------------------------------------------------------") +message("make install | Install Eigen to ${CMAKE_INSTALL_PREFIX}") +message(" | Do: cmake -DCMAKE_INSTALL_PREFIX=yourprefix . to change that") +message("make test | Build and run the unit tests (using CTest)") +message(" | Note: this takes lots of time & memory! Easy on the -j option!") +message("make btest | Only build tests, don't run them") +message("make doc | Generate the API documentation, requires Doxygen & LaTeX") +message("make blas | Build BLAS library") +message("-------------+------------------------------------------------------------------") |