diff options
author | Brad King <brad.king@kitware.com> | 2020-09-18 12:42:21 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-09-18 12:42:28 (GMT) |
commit | 5d952fd6e2eef8b5943cf437e8a9b5d55cd02782 (patch) | |
tree | ef68cfb382ad1f93ca1fa118788f421c88da5596 /Tests/RunCMake/NinjaMultiConfig/CustomCommandsAndTargets.cmake | |
parent | edb9e3402711c742d6287b8b1b17002c29c95cfe (diff) | |
parent | 23fe4b861f5cd2c513981b04bee7c36b467ac100 (diff) | |
download | CMake-5d952fd6e2eef8b5943cf437e8a9b5d55cd02782.zip CMake-5d952fd6e2eef8b5943cf437e8a9b5d55cd02782.tar.gz CMake-5d952fd6e2eef8b5943cf437e8a9b5d55cd02782.tar.bz2 |
Merge topic 'ninja-multi-automoc-regression'
23fe4b861f Ninja Multi-Config: Fix dependencies of custom commands
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5238
Diffstat (limited to 'Tests/RunCMake/NinjaMultiConfig/CustomCommandsAndTargets.cmake')
-rw-r--r-- | Tests/RunCMake/NinjaMultiConfig/CustomCommandsAndTargets.cmake | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Tests/RunCMake/NinjaMultiConfig/CustomCommandsAndTargets.cmake b/Tests/RunCMake/NinjaMultiConfig/CustomCommandsAndTargets.cmake index b6f1152..7bed090 100644 --- a/Tests/RunCMake/NinjaMultiConfig/CustomCommandsAndTargets.cmake +++ b/Tests/RunCMake/NinjaMultiConfig/CustomCommandsAndTargets.cmake @@ -35,13 +35,15 @@ add_subdirectory(CustomCommandsAndTargetsSubdir) create_targets(Top) add_executable(RootExe main.c) -add_custom_target(RootCustom COMMAND ${CMAKE_COMMAND} -E touch Root.txt BYPRODUCTS Root.txt) -add_executable(LeafExe main.c) -add_custom_target(LeafCustom COMMAND ${CMAKE_COMMAND} -E touch Leaf.txt BYPRODUCTS Leaf.txt DEPENDS RootCustom RootExe) -add_dependencies(LeafExe RootExe RootCustom) +add_custom_target(RootCustom COMMAND ${CMAKE_COMMAND} -E touch RootCustom.txt BYPRODUCTS RootCustom.txt) +add_custom_command(OUTPUT main.c COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/main.c ${CMAKE_CURRENT_BINARY_DIR}/main.c DEPENDS RootCustom) +add_executable(LeafExe ${CMAKE_CURRENT_BINARY_DIR}/main.c) +add_custom_target(LeafCustom COMMAND ${CMAKE_COMMAND} -E touch LeafCustom.txt BYPRODUCTS LeafCustom.txt DEPENDS RootCustom RootExe) +add_dependencies(LeafExe RootExe) file(APPEND "${CMAKE_BINARY_DIR}/target_files_custom.cmake" -"set(TARGET_BYPRODUCTS_LeafCustom [==[${CMAKE_CURRENT_BINARY_DIR}/Leaf.txt]==]) -set(TARGET_BYPRODUCTS_RootCustom [==[${CMAKE_CURRENT_BINARY_DIR}/Root.txt]==]) +"set(TARGET_BYPRODUCTS_LeafCustom [==[${CMAKE_CURRENT_BINARY_DIR}/LeafCustom.txt]==]) +set(TARGET_BYPRODUCTS_LeafExe [==[${CMAKE_CURRENT_BINARY_DIR}/main.c]==]) +set(TARGET_BYPRODUCTS_RootCustom [==[${CMAKE_CURRENT_BINARY_DIR}/RootCustom.txt]==]) ") include(${CMAKE_CURRENT_LIST_DIR}/Common.cmake) |