summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-10-07 20:11:52 (GMT)
committerBrad King <brad.king@kitware.com>2009-10-07 20:11:52 (GMT)
commit7dcfc8d23a3624504b344fdc4e7fe4080d853b23 (patch)
treef4649a14dc7038281b74c743bedff78ffb748501 /Tests/CMakeLists.txt
parent2c1a01dc6d95351a58d7cfff6e87c43a18964eb2 (diff)
downloadCMake-7dcfc8d23a3624504b344fdc4e7fe4080d853b23.zip
CMake-7dcfc8d23a3624504b344fdc4e7fe4080d853b23.tar.gz
CMake-7dcfc8d23a3624504b344fdc4e7fe4080d853b23.tar.bz2
Make Complex test of CMakeLib more optional
Previously we passed inputs to the decision to each Complex test and let the test source decide. This commit moves the decision out of the tests and makes it an option() in their source. This makes it possible to build the Complex tests from outside the CMake test tree.
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r--Tests/CMakeLists.txt10
1 files changed, 6 insertions, 4 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 84648b1..e244721 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -486,6 +486,10 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
SET(COMPILER_IS_COMO 1)
ENDIF(CMAKE_BASE_NAME MATCHES "^como$")
IF(NOT COMPILER_IS_COMO)
+ SET(COMPLEX_TEST_CMAKELIB 1)
+ IF(CMAKE_TEST_DIFFERENT_GENERATOR OR CMAKE_TEST_SYSTEM_LIBRARIES)
+ SET(COMPLEX_TEST_CMAKELIB 0)
+ ENDIF(CMAKE_TEST_DIFFERENT_GENERATOR OR CMAKE_TEST_SYSTEM_LIBRARIES)
ADD_TEST(complex ${CMAKE_CTEST_COMMAND}
--build-and-test
"${CMake_SOURCE_DIR}/Tests/Complex"
@@ -497,8 +501,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
--build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-exe-dir "${CMake_BINARY_DIR}/Tests/Complex/bin"
--build-options
- -DCMAKE_TEST_DIFFERENT_GENERATOR:BOOL=${CMAKE_TEST_DIFFERENT_GENERATOR}
- -DCMAKE_TEST_SYSTEM_LIBRARIES:BOOL=${CMAKE_TEST_SYSTEM_LIBRARIES}
+ -DCOMPLEX_TEST_CMAKELIB:BOOL=${COMPLEX_TEST_CMAKELIB}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
--test-command complex
)
@@ -513,8 +516,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
--build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-exe-dir "${CMake_BINARY_DIR}/Tests/ComplexOneConfig/bin"
--build-options
- -DCMAKE_TEST_DIFFERENT_GENERATOR:BOOL=${CMAKE_TEST_DIFFERENT_GENERATOR}
- -DCMAKE_TEST_SYSTEM_LIBRARIES:BOOL=${CMAKE_TEST_SYSTEM_LIBRARIES}
+ -DCOMPLEX_TEST_CMAKELIB:BOOL=${COMPLEX_TEST_CMAKELIB}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
--test-command complex)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/ComplexOneConfig")