summaryrefslogtreecommitdiffstats
path: root/Tests/CustomCommand
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/CustomCommand')
-rw-r--r--Tests/CustomCommand/CMakeLists.txt11
1 files changed, 7 insertions, 4 deletions
diff --git a/Tests/CustomCommand/CMakeLists.txt b/Tests/CustomCommand/CMakeLists.txt
index bbae387..e0854ce 100644
--- a/Tests/CustomCommand/CMakeLists.txt
+++ b/Tests/CustomCommand/CMakeLists.txt
@@ -185,7 +185,7 @@ add_executable(CustomCommand
# here to test adding the generation rule after referencing the
# generated source in a target.
add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/generated.c
- DEPENDS generator
+ DEPENDS $<1:generator> $<0:does_not_exist>
COMMAND generator
ARGS ${PROJECT_BINARY_DIR}/generated.c
)
@@ -221,8 +221,11 @@ add_subdirectory(GeneratorInExtraDir)
add_executable(tcat tcat.cxx)
+# Test that list expansion from a generator expression works.
+set_property(TARGET tcat PROPERTY DEPSLIST tcat gen_redirect_in.c)
+
add_custom_command(OUTPUT gen_redirect.c
- DEPENDS tcat gen_redirect_in.c
+ DEPENDS $<TARGET_PROPERTY:tcat,DEPSLIST>
COMMAND tcat < ${CMAKE_CURRENT_SOURCE_DIR}/gen_redirect_in.c > gen_redirect.c
COMMAND ${CMAKE_COMMAND} -E echo "#endif" >> gen_redirect.c
VERBATIM
@@ -364,8 +367,8 @@ endif()
foreach(arg ${CHECK_ARGS} "")
set(ARG "${arg}")
- string(REGEX REPLACE "\\\\" "\\\\\\\\" ARG "${ARG}")
- string(REGEX REPLACE "\"" "\\\\\"" ARG "${ARG}")
+ string(REPLACE "\\" "\\\\" ARG "${ARG}")
+ string(REPLACE "\"" "\\\"" ARG "${ARG}")
set(EXPECTED_ARGUMENTS
"${EXPECTED_ARGUMENTS} \"${ARG}\",
")