diff options
author | Brad King <brad.king@kitware.com> | 2009-04-09 17:56:08 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-04-09 17:56:08 (GMT) |
commit | 68248be52ec69f06e41c52dcf950caf7d6f2da08 (patch) | |
tree | 6ae3d3ffc890aeb8f33b40e21d7b907fad93286e /Tests/ExternalProject/Step1Patch.cmake | |
parent | dfd95e100dc5fcfd428cdc00f1d79d44c99449ac (diff) | |
download | CMake-68248be52ec69f06e41c52dcf950caf7d6f2da08.zip CMake-68248be52ec69f06e41c52dcf950caf7d6f2da08.tar.gz CMake-68248be52ec69f06e41c52dcf950caf7d6f2da08.tar.bz2 |
ENH: Allow lists in AddExternalProject arguments
The add_external_project function separates its arguments with ';'
separators, so previously no command line argument could contain one.
When specifying CMAKE_ARGS, some -D argument values may need to contain
a semicolon to form lists in the external project cache.
This adds add_external_project argument LIST_SEPARATOR to specify a list
separator string. The separator is replaced by ';' in arguments to any
command created to drive the external project. For example:
add_external_project(...
LIST_SEPARATOR ::
CMAKE_ARGS -DSOME_LIST:STRING=A::B::C
...)
passes "-DSOME_LIST:STRING=A;B;C" to CMake for the external project.
Diffstat (limited to 'Tests/ExternalProject/Step1Patch.cmake')
-rw-r--r-- | Tests/ExternalProject/Step1Patch.cmake | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Tests/ExternalProject/Step1Patch.cmake b/Tests/ExternalProject/Step1Patch.cmake index 1a1920a..35e09d9 100644 --- a/Tests/ExternalProject/Step1Patch.cmake +++ b/Tests/ExternalProject/Step1Patch.cmake @@ -17,5 +17,9 @@ endif() file(APPEND CMakeLists.txt " # Patch by ExternalProject test: set_property(TARGET Tutorial PROPERTY OUTPUT_NAME EP-Tutorial) +list(LENGTH TEST_LIST len) +if(NOT len EQUAL 3) + message(FATAL_ERROR \"TEST_LIST length is \${len}, not 3\") +endif() ") message(STATUS "Patched ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt") |