diff options
author | Brad King <brad.king@kitware.com> | 2021-01-05 14:01:05 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-01-05 14:01:12 (GMT) |
commit | 78c95e5a1cf00afd222e2cfcaebd7bb38ce71d4e (patch) | |
tree | a83f6a9eb875372efe86cd278de8e2cc22f8f8f2 /Tests | |
parent | 764ce15ffbe232347a41e40509a2e485bae226f6 (diff) | |
parent | d43f4692e0c5e6f71305be74fbed7c6120057d9d (diff) | |
download | CMake-78c95e5a1cf00afd222e2cfcaebd7bb38ce71d4e.zip CMake-78c95e5a1cf00afd222e2cfcaebd7bb38ce71d4e.tar.gz CMake-78c95e5a1cf00afd222e2cfcaebd7bb38ce71d4e.tar.bz2 |
Merge topic 'ninja-omit-empty-custom-command'
d43f4692e0 Ninja: Omit custom commands with an empty COMMAND
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5647
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CustomCommand/CMakeLists.txt | 4 | ||||
-rw-r--r-- | Tests/CustomCommand/empty_command.cxx | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/Tests/CustomCommand/CMakeLists.txt b/Tests/CustomCommand/CMakeLists.txt index c1a7a57..80545c4 100644 --- a/Tests/CustomCommand/CMakeLists.txt +++ b/Tests/CustomCommand/CMakeLists.txt @@ -582,3 +582,7 @@ set_target_properties(mac_fw PROPERTIES ) add_custom_command(OUTPUT mac_fw.txt COMMAND ${CMAKE_COMMAND} -E touch mac_fw.txt DEPENDS mac_fw) add_custom_target(drive_mac_fw ALL DEPENDS mac_fw.txt) + +# Test empty COMMANDs are ommited +add_executable(empty_command empty_command.cxx) +add_custom_command(TARGET empty_command POST_BUILD COMMAND $<0:date>) diff --git a/Tests/CustomCommand/empty_command.cxx b/Tests/CustomCommand/empty_command.cxx new file mode 100644 index 0000000..f8b643a --- /dev/null +++ b/Tests/CustomCommand/empty_command.cxx @@ -0,0 +1,4 @@ +int main() +{ + return 0; +} |