summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests')
-rw-r--r--Tests/ExternalProject/CMakeLists.txt4
-rw-r--r--Tests/ExternalProject/Step1Patch.cmake4
2 files changed, 8 insertions, 0 deletions
diff --git a/Tests/ExternalProject/CMakeLists.txt b/Tests/ExternalProject/CMakeLists.txt
index 37374c1..63ab7ef 100644
--- a/Tests/ExternalProject/CMakeLists.txt
+++ b/Tests/ExternalProject/CMakeLists.txt
@@ -117,16 +117,20 @@ endif()
set(proj TutorialStep1-LocalTAR)
add_external_project(${proj}
TAR "${CMAKE_CURRENT_SOURCE_DIR}/Step1.tar"
+ LIST_SEPARATOR ::
PATCH_COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/Step1Patch.cmake
CMAKE_GENERATOR "${CMAKE_GENERATOR}"
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${prefix}
+ -DTEST_LIST:STRING=A::B::C
INSTALL_COMMAND ""
)
set(proj TutorialStep1-LocalNoDirTAR)
add_external_project(${proj}
TAR "${CMAKE_CURRENT_SOURCE_DIR}/Step1NoDir.tar"
+ LIST_SEPARATOR @@
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${prefix} -G ${CMAKE_GENERATOR} ${source_dir}/${proj}
+ -DTEST_LIST:STRING=1@@2@@3
INSTALL_COMMAND ""
)
add_external_project_step(${proj} mypatch
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")