diff options
Diffstat (limited to 'Tests/RunCMake/ExternalProject/CMAKE_CACHE_ARGS.cmake')
-rw-r--r-- | Tests/RunCMake/ExternalProject/CMAKE_CACHE_ARGS.cmake | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/Tests/RunCMake/ExternalProject/CMAKE_CACHE_ARGS.cmake b/Tests/RunCMake/ExternalProject/CMAKE_CACHE_ARGS.cmake index bf9b12d..5e37eec 100644 --- a/Tests/RunCMake/ExternalProject/CMAKE_CACHE_ARGS.cmake +++ b/Tests/RunCMake/ExternalProject/CMAKE_CACHE_ARGS.cmake @@ -1,21 +1,5 @@ include(ExternalProject) -set(_tmp_dir "${CMAKE_CURRENT_BINARY_DIR}/tmp") -set(_cache_file "${_tmp_dir}/FOO-cache.cmake") - -ExternalProject_Add(FOO TMP_DIR "${_tmp_dir}" +ExternalProject_Add(FOO TMP_DIR "${CMAKE_CURRENT_BINARY_DIR}/tmp" DOWNLOAD_COMMAND "" CMAKE_CACHE_ARGS "-DFOO:STRING=BAR") - -if(NOT EXISTS "${_cache_file}") - message(FATAL_ERROR "Initial cache not created") -endif() - -file(READ "${_cache_file}" _cache) - -if(NOT "${_cache}" MATCHES "set\\(FOO \"BAR\".+\\)") # \(\) - message(FATAL_ERROR "Cannot find FOO argument in cache") -endif() -if(NOT "${CMAKE_MATCH_0}" MATCHES FORCE) - message(FATAL_ERROR "Expected forced FOO argument") -endif() |