2015-04-17 07:42:19 +03:00
|
|
|
set(_cache_file "${RunCMake_TEST_BINARY_DIR}/tmp/FOO-cache-Debug.cmake")
|
2015-04-20 17:24:50 +03:00
|
|
|
|
|
|
|
if(NOT EXISTS "${_cache_file}")
|
|
|
|
set(RunCMake_TEST_FAILED "Initial cache not created")
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
file(READ "${_cache_file}" _cache)
|
|
|
|
|
|
|
|
if(NOT "${_cache}" MATCHES "set\\(FOO \"BAR\".+\\)") # \(\)
|
|
|
|
set(RunCMake_TEST_FAILED "Cannot find FOO argument in cache")
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
if(NOT "${CMAKE_MATCH_0}" MATCHES FORCE)
|
|
|
|
set(RunCMake_TEST_FAILED "Expected forced FOO argument")
|
|
|
|
return()
|
|
|
|
endif()
|
2016-10-10 18:39:57 +03:00
|
|
|
|
|
|
|
if(NOT "${_cache}" MATCHES "set\\(TEST_LIST \"A;B;C\".+\\)")
|
|
|
|
set(RunCMake_TEST_FAILED "Cannot find TEST_LIST argument in cache")
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
if(NOT "${CMAKE_MATCH_0}" MATCHES FORCE)
|
|
|
|
set(RunCMake_TEST_FAILED "Expected forced TEST_LIST argument")
|
|
|
|
return()
|
|
|
|
endif()
|