diff options
author | Daniel Eiband <daniel.eiband@brainlab.com> | 2019-09-16 08:24:24 (GMT) |
---|---|---|
committer | Daniel Eiband <daniel.eiband@brainlab.com> | 2019-09-16 08:24:24 (GMT) |
commit | 3b409643bd0f69d38d91bba6b64250e48b276398 (patch) | |
tree | a9f97f280e9599c7504ddc751edd8c4553be066d /Tests/CustomCommandByproducts | |
parent | 445ff5ccdf7f888b48d12076fb42ca856482779f (diff) | |
download | CMake-3b409643bd0f69d38d91bba6b64250e48b276398.zip CMake-3b409643bd0f69d38d91bba6b64250e48b276398.tar.gz CMake-3b409643bd0f69d38d91bba6b64250e48b276398.tar.bz2 |
Byproducts: Add test for collapsing of full paths in byproducts
Add test for collapsing of full paths in byproducts and additional tests for
the GENERATED source file properties set by add_custom_command and
add_custom_target with relative paths.
Diffstat (limited to 'Tests/CustomCommandByproducts')
-rw-r--r-- | Tests/CustomCommandByproducts/CMakeLists.txt | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Tests/CustomCommandByproducts/CMakeLists.txt b/Tests/CustomCommandByproducts/CMakeLists.txt index bfa69ce..08c897c 100644 --- a/Tests/CustomCommandByproducts/CMakeLists.txt +++ b/Tests/CustomCommandByproducts/CMakeLists.txt @@ -14,20 +14,20 @@ add_custom_command( # Generate a byproduct in a rule that runs in a dependency of the consumer. add_custom_command( - OUTPUT timestamp2.txt + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/../CustomCommandByproducts/timestamp2.txt COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/byproduct2.c.in byproduct2.c - BYPRODUCTS byproduct2.c + BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/../CustomCommandByproducts/byproduct2.c COMMAND ${CMAKE_COMMAND} -E touch timestamp2.txt DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/byproduct2.c.in ) -add_custom_target(Producer2 DEPENDS timestamp2.txt) +add_custom_target(Producer2 DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/timestamp2.txt) # Generate a byproduct in a custom target. add_custom_target(Producer3_4 COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/byproduct3.c.in byproduct3.c - BYPRODUCTS byproduct3.c + BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/../CustomCommandByproducts/byproduct3.c DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/byproduct3.c.in ) @@ -36,7 +36,7 @@ add_custom_command( TARGET Producer3_4 POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/byproduct4.c.in byproduct4.c - BYPRODUCTS byproduct4.c + BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/../CustomCommandByproducts/byproduct4.c DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/byproduct4.c.in ) |