diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2020-02-07 19:18:54 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2020-02-07 19:18:54 (GMT) |
commit | 67102d3252f744987762ae19c4bfffeb11cdd46e (patch) | |
tree | 90714a5acbd052779b36cf56940ebf2032068bbf /Tests/RunCMake/NinjaMultiConfig/CustomCommandDepfile.cmake | |
parent | ad17c37d345cd143a131e4b5f26196e0e749ec0e (diff) | |
download | CMake-67102d3252f744987762ae19c4bfffeb11cdd46e.zip CMake-67102d3252f744987762ae19c4bfffeb11cdd46e.tar.gz CMake-67102d3252f744987762ae19c4bfffeb11cdd46e.tar.bz2 |
Ninja Multi-Config: Add support for DEPFILE option in add_custom_command()
And give other generators a path forward to add support in the future.
Diffstat (limited to 'Tests/RunCMake/NinjaMultiConfig/CustomCommandDepfile.cmake')
-rw-r--r-- | Tests/RunCMake/NinjaMultiConfig/CustomCommandDepfile.cmake | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Tests/RunCMake/NinjaMultiConfig/CustomCommandDepfile.cmake b/Tests/RunCMake/NinjaMultiConfig/CustomCommandDepfile.cmake new file mode 100644 index 0000000..1a42670 --- /dev/null +++ b/Tests/RunCMake/NinjaMultiConfig/CustomCommandDepfile.cmake @@ -0,0 +1,9 @@ +add_custom_command( + OUTPUT main.copy.c + COMMAND "${CMAKE_COMMAND}" -E copy + "${CMAKE_CURRENT_SOURCE_DIR}/main.c" + main.copy.c + WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" + DEPFILE "test.d" + ) +add_custom_target(copy ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/main.copy.c") |