diff --git a/CMakeLists.txt b/CMakeLists.txt index 8bc7d4754..09934cdcc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -132,9 +132,9 @@ add_subdirectory(doc EXCLUDE_FROM_ALL) include(CTest) 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 + add_subdirectory(test) # can't do EXCLUDE_FROM_ALL here, breaks CTest else() -add_subdirectory(test EXCLUDE_FROM_ALL) + add_subdirectory(test EXCLUDE_FROM_ALL) endif() add_subdirectory(unsupported) @@ -171,4 +171,4 @@ endif() message("") message("To build/run the unit tests, read this page:") message(" http://eigen.tuxfamily.org/index.php?title=Tests") -message("") \ No newline at end of file +message("") diff --git a/unsupported/CMakeLists.txt b/unsupported/CMakeLists.txt index 7104085a3..4fef40a86 100644 --- a/unsupported/CMakeLists.txt +++ b/unsupported/CMakeLists.txt @@ -1,3 +1,7 @@ add_subdirectory(Eigen) add_subdirectory(doc EXCLUDE_FROM_ALL) -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()