aboutsummaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGravatar NeroBurner <pyro4hell@gmail.com>2017-01-02 09:09:21 +0100
committerGravatar NeroBurner <pyro4hell@gmail.com>2017-01-02 09:09:21 +0100
commitc4fc2611ba34652f98b5e0ac9f817879bef8eed1 (patch)
tree21c26eeb23304900f4d76ba955f7c0508750a076 /CMakeLists.txt
parent45199b97730cc8f4773d7133478e3296b25c18ba (diff)
add cmake-option to enable/disable creation of tests
* * * disable unsupportet/test when test are disabled * * * rename EIGEN_ENABLE_TESTS to BUILD_TESTING * * * consider BUILD_TESTING in blas
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt21
1 files changed, 11 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7237b54df..aab9c0e2c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -416,16 +416,15 @@ add_subdirectory(Eigen)
add_subdirectory(doc EXCLUDE_FROM_ALL)
-include(EigenConfigureTesting)
+option(BUILD_TESTING "Enable creation of Eigen tests." ON)
+if(BUILD_TESTING)
+ include(EigenConfigureTesting)
-# fixme, not sure this line is still needed:
-enable_testing() # must be called from the root CMakeLists, see man page
-
-
-if(EIGEN_LEAVE_TEST_IN_ALL_TARGET)
- add_subdirectory(test) # can't do EXCLUDE_FROM_ALL here, breaks CTest
-else()
- add_subdirectory(test EXCLUDE_FROM_ALL)
+ if(EIGEN_LEAVE_TEST_IN_ALL_TARGET)
+ add_subdirectory(test) # can't do EXCLUDE_FROM_ALL here, breaks CTest
+ else()
+ add_subdirectory(test EXCLUDE_FROM_ALL)
+ endif()
endif()
if(EIGEN_LEAVE_TEST_IN_ALL_TARGET)
@@ -461,7 +460,9 @@ endif(NOT WIN32)
configure_file(scripts/cdashtesting.cmake.in cdashtesting.cmake @ONLY)
-ei_testing_print_summary()
+if(BUILD_TESTING)
+ ei_testing_print_summary()
+endif()
message(STATUS "")
message(STATUS "Configured Eigen ${EIGEN_VERSION_NUMBER}")