Merge branch 'ExternalProject-fix-CMAKE_CACHE_ARGS-list' into release
This commit is contained in:
commit
acd2eab2f3
|
@ -1160,7 +1160,7 @@ function(_ep_command_line_to_initial_cache var args force)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
# Assume this is a list to append to the last var
|
# Assume this is a list to append to the last var
|
||||||
list(APPEND accumulator "${line}")
|
string(APPEND accumulator ";${line}")
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
# Catch the final line of the args
|
# Catch the final line of the args
|
||||||
|
|
|
@ -15,3 +15,12 @@ if(NOT "${CMAKE_MATCH_0}" MATCHES FORCE)
|
||||||
set(RunCMake_TEST_FAILED "Expected forced FOO argument")
|
set(RunCMake_TEST_FAILED "Expected forced FOO argument")
|
||||||
return()
|
return()
|
||||||
endif()
|
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()
|
||||||
|
|
|
@ -5,4 +5,6 @@ include(ExternalProject)
|
||||||
|
|
||||||
ExternalProject_Add(FOO TMP_DIR "${CMAKE_CURRENT_BINARY_DIR}/tmp"
|
ExternalProject_Add(FOO TMP_DIR "${CMAKE_CURRENT_BINARY_DIR}/tmp"
|
||||||
DOWNLOAD_COMMAND ""
|
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")
|
||||||
|
|
|
@ -15,3 +15,12 @@ if("${CMAKE_MATCH_0}" MATCHES FORCE)
|
||||||
set(RunCMake_TEST_FAILED "Expected not forced FOO argument")
|
set(RunCMake_TEST_FAILED "Expected not forced FOO argument")
|
||||||
return()
|
return()
|
||||||
endif()
|
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()
|
||||||
|
|
|
@ -5,4 +5,6 @@ include(ExternalProject)
|
||||||
|
|
||||||
ExternalProject_Add(FOO TMP_DIR "${CMAKE_CURRENT_BINARY_DIR}/tmp"
|
ExternalProject_Add(FOO TMP_DIR "${CMAKE_CURRENT_BINARY_DIR}/tmp"
|
||||||
DOWNLOAD_COMMAND ""
|
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")
|
||||||
|
|
Loading…
Reference in New Issue