diff options
Diffstat (limited to 'Tests/RunCMake/ExternalProject/CMAKE_CACHE_DEFAULT_ARGS-check.cmake')
-rw-r--r-- | Tests/RunCMake/ExternalProject/CMAKE_CACHE_DEFAULT_ARGS-check.cmake | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Tests/RunCMake/ExternalProject/CMAKE_CACHE_DEFAULT_ARGS-check.cmake b/Tests/RunCMake/ExternalProject/CMAKE_CACHE_DEFAULT_ARGS-check.cmake index 2bef56e..059f6d3 100644 --- a/Tests/RunCMake/ExternalProject/CMAKE_CACHE_DEFAULT_ARGS-check.cmake +++ b/Tests/RunCMake/ExternalProject/CMAKE_CACHE_DEFAULT_ARGS-check.cmake @@ -33,3 +33,12 @@ if("${CMAKE_MATCH_0}" MATCHES FORCE) set(RunCMake_TEST_FAILED "Expected not forced TEST_OPTIONAL argument") return() endif() + +if(NOT "${_cache}" MATCHES "set\\(TEST_OPTIONAL_LAST \"TEST_OPTIONAL_LAST-NOTFOUND\".+\\)") + set(RunCMake_TEST_FAILED "Cannot find TEST_OPTIONAL_LAST argument in cache") + return() +endif() +if("${CMAKE_MATCH_0}" MATCHES FORCE) + set(RunCMake_TEST_FAILED "Expected not forced TEST_OPTIONAL_LAST argument") + return() +endif() |