diff options
author | Ken Martin <ken.martin@kitware.com> | 2002-10-09 19:54:34 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2002-10-09 19:54:34 (GMT) |
commit | aef8110c36773c11283f998c38998d364be9b054 (patch) | |
tree | 0d20d2e13bcf3ebb09e3ec86b89fa70ce10751cf /Tests | |
parent | f990777a605f200d00aa5ba980c1acbdc9446ed9 (diff) | |
download | CMake-aef8110c36773c11283f998c38998d364be9b054.zip CMake-aef8110c36773c11283f998c38998d364be9b054.tar.gz CMake-aef8110c36773c11283f998c38998d364be9b054.tar.bz2 |
added test of SET CACHE FORCE
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/Complex/CMakeLists.txt | 6 | ||||
-rw-r--r-- | Tests/Complex/Executable/complex.cxx | 6 | ||||
-rw-r--r-- | Tests/Complex/cmTestConfigure.h.in | 3 | ||||
-rw-r--r-- | Tests/ComplexOneConfig/CMakeLists.txt | 6 | ||||
-rw-r--r-- | Tests/ComplexOneConfig/Executable/complex.cxx | 6 | ||||
-rw-r--r-- | Tests/ComplexOneConfig/cmTestConfigure.h.in | 3 | ||||
-rw-r--r-- | Tests/ComplexRelativePaths/CMakeLists.txt | 6 | ||||
-rw-r--r-- | Tests/ComplexRelativePaths/Executable/complex.cxx | 6 | ||||
-rw-r--r-- | Tests/ComplexRelativePaths/cmTestConfigure.h.in | 3 |
9 files changed, 45 insertions, 0 deletions
diff --git a/Tests/Complex/CMakeLists.txt b/Tests/Complex/CMakeLists.txt index 849ec3c..bcc56a5 100644 --- a/Tests/Complex/CMakeLists.txt +++ b/Tests/Complex/CMakeLists.txt @@ -68,6 +68,12 @@ LINK_DIRECTORIES( ) # +# check for SET CACHE FORCE +# +SET(FORCE_TEST 1 CACHE STRING "a test") +SET(FORCE_TEST 0 CACHE STRING "a test" FORCE) + +# # Lib and exe path # SET (LIBRARY_OUTPUT_PATH diff --git a/Tests/Complex/Executable/complex.cxx b/Tests/Complex/Executable/complex.cxx index c5969cb..7aa4140 100644 --- a/Tests/Complex/Executable/complex.cxx +++ b/Tests/Complex/Executable/complex.cxx @@ -809,6 +809,12 @@ int main() cmFailed("IF inside a FOREACH block is broken"); #endif +#ifdef FORCE_TEST + cmFailed("CMake SET CACHE FORCE"); +#else + cmPassed("CMake SET CACHE FORCE"); +#endif + // ---------------------------------------------------------------------- // Summary diff --git a/Tests/Complex/cmTestConfigure.h.in b/Tests/Complex/cmTestConfigure.h.in index 350a9c0..0d380b1 100644 --- a/Tests/Complex/cmTestConfigure.h.in +++ b/Tests/Complex/cmTestConfigure.h.in @@ -64,3 +64,6 @@ // Test IF inside FOREACH #cmakedefine IF_INSIDE_FOREACH_THEN_EXECUTED #cmakedefine IF_INSIDE_FOREACH_ELSE_EXECUTED + +// Test SET CACHE FORCE +#cmakedefine FORCE_TEST diff --git a/Tests/ComplexOneConfig/CMakeLists.txt b/Tests/ComplexOneConfig/CMakeLists.txt index 849ec3c..bcc56a5 100644 --- a/Tests/ComplexOneConfig/CMakeLists.txt +++ b/Tests/ComplexOneConfig/CMakeLists.txt @@ -68,6 +68,12 @@ LINK_DIRECTORIES( ) # +# check for SET CACHE FORCE +# +SET(FORCE_TEST 1 CACHE STRING "a test") +SET(FORCE_TEST 0 CACHE STRING "a test" FORCE) + +# # Lib and exe path # SET (LIBRARY_OUTPUT_PATH diff --git a/Tests/ComplexOneConfig/Executable/complex.cxx b/Tests/ComplexOneConfig/Executable/complex.cxx index c5969cb..7aa4140 100644 --- a/Tests/ComplexOneConfig/Executable/complex.cxx +++ b/Tests/ComplexOneConfig/Executable/complex.cxx @@ -809,6 +809,12 @@ int main() cmFailed("IF inside a FOREACH block is broken"); #endif +#ifdef FORCE_TEST + cmFailed("CMake SET CACHE FORCE"); +#else + cmPassed("CMake SET CACHE FORCE"); +#endif + // ---------------------------------------------------------------------- // Summary diff --git a/Tests/ComplexOneConfig/cmTestConfigure.h.in b/Tests/ComplexOneConfig/cmTestConfigure.h.in index 350a9c0..0d380b1 100644 --- a/Tests/ComplexOneConfig/cmTestConfigure.h.in +++ b/Tests/ComplexOneConfig/cmTestConfigure.h.in @@ -64,3 +64,6 @@ // Test IF inside FOREACH #cmakedefine IF_INSIDE_FOREACH_THEN_EXECUTED #cmakedefine IF_INSIDE_FOREACH_ELSE_EXECUTED + +// Test SET CACHE FORCE +#cmakedefine FORCE_TEST diff --git a/Tests/ComplexRelativePaths/CMakeLists.txt b/Tests/ComplexRelativePaths/CMakeLists.txt index 849ec3c..bcc56a5 100644 --- a/Tests/ComplexRelativePaths/CMakeLists.txt +++ b/Tests/ComplexRelativePaths/CMakeLists.txt @@ -68,6 +68,12 @@ LINK_DIRECTORIES( ) # +# check for SET CACHE FORCE +# +SET(FORCE_TEST 1 CACHE STRING "a test") +SET(FORCE_TEST 0 CACHE STRING "a test" FORCE) + +# # Lib and exe path # SET (LIBRARY_OUTPUT_PATH diff --git a/Tests/ComplexRelativePaths/Executable/complex.cxx b/Tests/ComplexRelativePaths/Executable/complex.cxx index c5969cb..7aa4140 100644 --- a/Tests/ComplexRelativePaths/Executable/complex.cxx +++ b/Tests/ComplexRelativePaths/Executable/complex.cxx @@ -809,6 +809,12 @@ int main() cmFailed("IF inside a FOREACH block is broken"); #endif +#ifdef FORCE_TEST + cmFailed("CMake SET CACHE FORCE"); +#else + cmPassed("CMake SET CACHE FORCE"); +#endif + // ---------------------------------------------------------------------- // Summary diff --git a/Tests/ComplexRelativePaths/cmTestConfigure.h.in b/Tests/ComplexRelativePaths/cmTestConfigure.h.in index 350a9c0..0d380b1 100644 --- a/Tests/ComplexRelativePaths/cmTestConfigure.h.in +++ b/Tests/ComplexRelativePaths/cmTestConfigure.h.in @@ -64,3 +64,6 @@ // Test IF inside FOREACH #cmakedefine IF_INSIDE_FOREACH_THEN_EXECUTED #cmakedefine IF_INSIDE_FOREACH_ELSE_EXECUTED + +// Test SET CACHE FORCE +#cmakedefine FORCE_TEST |