diff options
author | Brad King <brad.king@kitware.com> | 2014-03-20 13:22:17 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-03-20 13:22:17 (GMT) |
commit | e1c1f18e39020967c09bfaae2269e421c7091ca7 (patch) | |
tree | d8502725ec0a1003c664307c14200ccbc52f5241 /Tests | |
parent | deb981c0526f37d8405a34f9f6a7f1f3459d4aab (diff) | |
parent | bbffccca42d4f209220e833e1a86e735a5c83339 (diff) | |
download | CMake-e1c1f18e39020967c09bfaae2269e421c7091ca7.zip CMake-e1c1f18e39020967c09bfaae2269e421c7091ca7.tar.gz CMake-e1c1f18e39020967c09bfaae2269e421c7091ca7.tar.bz2 |
Merge topic 'add_custom_command-DEPENDS-genex'
bbffccca add_custom_command: Evaluate generator expressions in DEPENDS
Diffstat (limited to 'Tests')
-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 |