added test of SET CACHE FORCE

This commit is contained in:
Ken Martin 2002-10-09 15:54:34 -04:00
parent f990777a60
commit aef8110c36
9 changed files with 45 additions and 0 deletions

View File

@ -67,6 +67,12 @@ LINK_DIRECTORIES(
${Complex_BINARY_DIR}/Library
)
#
# 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
#

View File

@ -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

View File

@ -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

View File

@ -67,6 +67,12 @@ LINK_DIRECTORIES(
${Complex_BINARY_DIR}/Library
)
#
# 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
#

View File

@ -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

View File

@ -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

View File

@ -67,6 +67,12 @@ LINK_DIRECTORIES(
${Complex_BINARY_DIR}/Library
)
#
# 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
#

View File

@ -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

View File

@ -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