diff options
author | Brad King <brad.king@kitware.com> | 2016-10-13 12:25:56 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-10-13 12:25:56 (GMT) |
commit | 9d0e556904e476d550b6cacfb4e927d63f1b5a37 (patch) | |
tree | 1e633b7a0b1b5d849ccd54eb5622cd636ca43b97 /Tests/RunCMake | |
parent | 3b07c58dbdb7fb02b7a61ea4bc3ea78d1bdbea9c (diff) | |
parent | a3c98cb30edba8ba19bc05d4e08fd344f3440f32 (diff) | |
download | CMake-9d0e556904e476d550b6cacfb4e927d63f1b5a37.zip CMake-9d0e556904e476d550b6cacfb4e927d63f1b5a37.tar.gz CMake-9d0e556904e476d550b6cacfb4e927d63f1b5a37.tar.bz2 |
Merge topic 'ExternalProject-fix-CMAKE_CACHE_ARGS-list'
a3c98cb3 ExternalProject: Fix regression in passing list to CMAKE_CACHE_ARGS
Diffstat (limited to 'Tests/RunCMake')
4 files changed, 24 insertions, 2 deletions
diff --git a/Tests/RunCMake/ExternalProject/CMAKE_CACHE_ARGS-check.cmake b/Tests/RunCMake/ExternalProject/CMAKE_CACHE_ARGS-check.cmake index c350a63..cb48be7 100644 --- a/Tests/RunCMake/ExternalProject/CMAKE_CACHE_ARGS-check.cmake +++ b/Tests/RunCMake/ExternalProject/CMAKE_CACHE_ARGS-check.cmake @@ -15,3 +15,12 @@ if(NOT "${CMAKE_MATCH_0}" MATCHES FORCE) set(RunCMake_TEST_FAILED "Expected forced FOO argument") return() endif() + +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() diff --git a/Tests/RunCMake/ExternalProject/CMAKE_CACHE_ARGS.cmake b/Tests/RunCMake/ExternalProject/CMAKE_CACHE_ARGS.cmake index 62b1640..1f76fd0 100644 --- a/Tests/RunCMake/ExternalProject/CMAKE_CACHE_ARGS.cmake +++ b/Tests/RunCMake/ExternalProject/CMAKE_CACHE_ARGS.cmake @@ -5,4 +5,6 @@ include(ExternalProject) ExternalProject_Add(FOO TMP_DIR "${CMAKE_CURRENT_BINARY_DIR}/tmp" DOWNLOAD_COMMAND "" - CMAKE_CACHE_ARGS "-DFOO:STRING=$<1:BAR>$<0:BAD>") + CMAKE_CACHE_ARGS + "-DFOO:STRING=$<1:BAR>$<0:BAD>" + "-DTEST_LIST:STRING=A;B;C") diff --git a/Tests/RunCMake/ExternalProject/CMAKE_CACHE_DEFAULT_ARGS-check.cmake b/Tests/RunCMake/ExternalProject/CMAKE_CACHE_DEFAULT_ARGS-check.cmake index aeee11f..c84932d 100644 --- a/Tests/RunCMake/ExternalProject/CMAKE_CACHE_DEFAULT_ARGS-check.cmake +++ b/Tests/RunCMake/ExternalProject/CMAKE_CACHE_DEFAULT_ARGS-check.cmake @@ -15,3 +15,12 @@ if("${CMAKE_MATCH_0}" MATCHES FORCE) set(RunCMake_TEST_FAILED "Expected not forced FOO argument") return() endif() + +if(NOT "${_cache}" MATCHES "set\\(TEST_LIST \"A;B;C\".+\\)") + set(RunCMake_TEST_FAILED "Cannot find TEST_LIST argument in cache") + return() +endif() +if("${CMAKE_MATCH_0}" MATCHES FORCE) + set(RunCMake_TEST_FAILED "Expected not forced TEST_LIST argument") + return() +endif() diff --git a/Tests/RunCMake/ExternalProject/CMAKE_CACHE_DEFAULT_ARGS.cmake b/Tests/RunCMake/ExternalProject/CMAKE_CACHE_DEFAULT_ARGS.cmake index 3a83dbe..1b619c8 100644 --- a/Tests/RunCMake/ExternalProject/CMAKE_CACHE_DEFAULT_ARGS.cmake +++ b/Tests/RunCMake/ExternalProject/CMAKE_CACHE_DEFAULT_ARGS.cmake @@ -5,4 +5,6 @@ include(ExternalProject) ExternalProject_Add(FOO TMP_DIR "${CMAKE_CURRENT_BINARY_DIR}/tmp" DOWNLOAD_COMMAND "" - CMAKE_CACHE_DEFAULT_ARGS "-DFOO:STRING=$<1:BAR>$<0:BAD>") + CMAKE_CACHE_DEFAULT_ARGS + "-DFOO:STRING=$<1:BAR>$<0:BAD>" + "-DTEST_LIST:STRING=A;B;C") |