added test of SET CACHE FORCE
This commit is contained in:
parent
f990777a60
commit
aef8110c36
|
@ -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
|
||||
#
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
#
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
#
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue