diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-03-07 16:20:10 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-03-20 13:21:56 (GMT) |
commit | bbffccca42d4f209220e833e1a86e735a5c83339 (patch) | |
tree | 2c59eda71ee2691eab3a5b922b17d91586b019c5 /Tests/CustomCommand/CMakeLists.txt | |
parent | fb4aff058d2595078300b682dc477f0ccba6d31b (diff) | |
download | CMake-bbffccca42d4f209220e833e1a86e735a5c83339.zip CMake-bbffccca42d4f209220e833e1a86e735a5c83339.tar.gz CMake-bbffccca42d4f209220e833e1a86e735a5c83339.tar.bz2 |
add_custom_command: Evaluate generator expressions in DEPENDS
Rely on evaluation in cmCustomCommandGenerator for the generators.
When tracing target dependencies, depend on the union of dependencies
for all configurations.
Diffstat (limited to 'Tests/CustomCommand/CMakeLists.txt')
-rw-r--r-- | Tests/CustomCommand/CMakeLists.txt | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Tests/CustomCommand/CMakeLists.txt b/Tests/CustomCommand/CMakeLists.txt index bbae387..a194a5f 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 |