diff options
author | Brad King <brad.king@kitware.com> | 2015-04-20 14:24:50 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-04-20 14:27:19 (GMT) |
commit | 28429270194c42973bbec6bd0e5aeae061a8925c (patch) | |
tree | b4386d10adc862b3594dde0d467e19d266b212a2 /Tests/RunCMake/ExternalProject/CMAKE_CACHE_ARGS.cmake | |
parent | 1f1b62b0e2598554349dce14542a4c383f620ada (diff) | |
download | CMake-28429270194c42973bbec6bd0e5aeae061a8925c.zip CMake-28429270194c42973bbec6bd0e5aeae061a8925c.tar.gz CMake-28429270194c42973bbec6bd0e5aeae061a8925c.tar.bz2 |
Tests: Delay RunCMake.ExternalProject case checks
Use RunCMake "-check.cmake" scripts to check the generated initial cache
file content so that the full generation process is completed.
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() |