summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/NinjaMultiConfig
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-03-26 13:23:13 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-03-26 13:23:19 (GMT)
commit2a2afe0ae4eeb417583cf3d84ebbcb365973bbe0 (patch)
tree52715da1da8654012b8c995416b4b5f543fb8ed0 /Tests/RunCMake/NinjaMultiConfig
parentfef28dbc1e252f5431f3602129a3b3a6cc0ab7bf (diff)
parent3b864b2583d977898638336f5a096ff33955bd7a (diff)
downloadCMake-2a2afe0ae4eeb417583cf3d84ebbcb365973bbe0.zip
CMake-2a2afe0ae4eeb417583cf3d84ebbcb365973bbe0.tar.gz
CMake-2a2afe0ae4eeb417583cf3d84ebbcb365973bbe0.tar.bz2
Merge topic 'ninja-multi-long-custom-command' into release-3.20
3b864b2583 Ninja Multi-Config: Include configs in long CC scripts Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5941
Diffstat (limited to 'Tests/RunCMake/NinjaMultiConfig')
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/LongCommandLine.cmake16
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake5
2 files changed, 21 insertions, 0 deletions
diff --git a/Tests/RunCMake/NinjaMultiConfig/LongCommandLine.cmake b/Tests/RunCMake/NinjaMultiConfig/LongCommandLine.cmake
new file mode 100644
index 0000000..00aa896
--- /dev/null
+++ b/Tests/RunCMake/NinjaMultiConfig/LongCommandLine.cmake
@@ -0,0 +1,16 @@
+enable_language(C)
+
+add_executable(generator main.c)
+
+string(REPEAT "." 5000 very_long)
+
+add_custom_command(
+ OUTPUT gen.txt
+ COMMAND generator "${very_long}" > gen.txt
+ )
+
+add_custom_target(
+ custom
+ ALL
+ DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/gen.txt"
+ )
diff --git a/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake b/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
index 21c2658..0d4db52 100644
--- a/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
@@ -193,9 +193,14 @@ run_cmake_build(SimpleCrossConfigs all-relwithdebinfo-in-release-graph Release a
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/PostBuild-build)
set(RunCMake_TEST_OPTIONS "-DCMAKE_CROSS_CONFIGS=all")
run_cmake_configure(PostBuild)
+unset(RunCMake_TEST_OPTIONS)
run_cmake_build(PostBuild release Release Exe)
run_cmake_build(PostBuild debug-in-release-graph Release Exe:Debug)
+set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/LongCommandLine-build)
+run_cmake_configure(LongCommandLine)
+run_cmake_build(LongCommandLine release Release custom)
+
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/Framework-build)
set(RunCMake_TEST_OPTIONS "-DCMAKE_CROSS_CONFIGS=all")
run_cmake_configure(Framework)