From d07c05b3a5e338a018e7b0992f32f45ef2f12495 Mon Sep 17 00:00:00 2001 From: Jitse Niesen Date: Fri, 13 Nov 2009 13:05:57 +0000 Subject: [PATCH] Build tests for unsupported modules if EIGEN_LEAVE_TEST_IN_ALL_TARGET --- CMakeLists.txt | 6 +++--- unsupported/CMakeLists.txt | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) 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()