diff options
author | Brad King <brad.king@kitware.com> | 2018-02-14 14:43:30 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-02-14 14:43:38 (GMT) |
commit | ead859f50c749172125601a20c728ad6f820c50b (patch) | |
tree | c69ce01a77e1ba8cf4211705fd1cfc9642a6d363 /Tests | |
parent | 34d35cd592da862085733761bfbecff8ebc7662a (diff) | |
parent | 22e8b3af041f49842aeafa2d97129f422404d7de (diff) | |
download | CMake-ead859f50c749172125601a20c728ad6f820c50b.zip CMake-ead859f50c749172125601a20c728ad6f820c50b.tar.gz CMake-ead859f50c749172125601a20c728ad6f820c50b.tar.bz2 |
Merge topic 'ninja-cmd'
22e8b3af Ninja: Generate scripts for long custom command sequences
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1604
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/CommandLength/CMakeLists.txt | 17 | ||||
-rw-r--r-- | Tests/CommandLength/test.c | 4 |
3 files changed, 23 insertions, 0 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 08bfebe..62157bb 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -816,6 +816,8 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release ADD_TEST_MACRO(CustomCommandByproducts CustomCommandByproducts) + ADD_TEST_MACRO(CommandLength CommandLength) + ADD_TEST_MACRO(EmptyDepends ${CMAKE_CTEST_COMMAND}) add_test(CustomCommandWorkingDirectory ${CMAKE_CTEST_COMMAND} diff --git a/Tests/CommandLength/CMakeLists.txt b/Tests/CommandLength/CMakeLists.txt new file mode 100644 index 0000000..6836051 --- /dev/null +++ b/Tests/CommandLength/CMakeLists.txt @@ -0,0 +1,17 @@ +cmake_minimum_required(VERSION 3.10) +project(CommandLength C) + +add_executable(CommandLength test.c) +add_custom_command(TARGET CommandLength POST_BUILD VERBATIM + COMMAND ${CMAKE_COMMAND} -E make_directory log) + +set(msg "xxxx $$$$ yyyy") +set(msg "${msg} ${msg}") +set(msg "${msg} ${msg}") +set(msg "${msg} ${msg}") +set(msg "${msg} ${msg}") +foreach(i RANGE 1 1000) + add_custom_command(TARGET CommandLength POST_BUILD VERBATIM + COMMAND ${CMAKE_COMMAND} -E echo "${i} ${msg}" > log/${i} + ) +endforeach() diff --git a/Tests/CommandLength/test.c b/Tests/CommandLength/test.c new file mode 100644 index 0000000..f8b643a --- /dev/null +++ b/Tests/CommandLength/test.c @@ -0,0 +1,4 @@ +int main() +{ + return 0; +} |