summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/NinjaMultiConfig
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-05-03 14:53:40 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-05-03 14:53:50 (GMT)
commit4419b944fdd7f1eaea06411224cfbe6242628c18 (patch)
tree0a65ff701c78b860ea15b7c5e0103fe2de1e678a /Tests/RunCMake/NinjaMultiConfig
parent4df3f5300a13827336ca5329b53834cf0fb63a7d (diff)
parentad08f93ee40a1cc855c403c1cc738237511224e3 (diff)
downloadCMake-4419b944fdd7f1eaea06411224cfbe6242628c18.zip
CMake-4419b944fdd7f1eaea06411224cfbe6242628c18.tar.gz
CMake-4419b944fdd7f1eaea06411224cfbe6242628c18.tar.bz2
Merge topic 'ninja-multi-long-command-line-config'
ad08f93ee4 Ninja Multi-Config: Split long command lines by config Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6067
Diffstat (limited to 'Tests/RunCMake/NinjaMultiConfig')
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/LongCommandLine-release-config-build-stdout.txt2
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/LongCommandLine.cmake7
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake3
3 files changed, 12 insertions, 0 deletions
diff --git a/Tests/RunCMake/NinjaMultiConfig/LongCommandLine-release-config-build-stdout.txt b/Tests/RunCMake/NinjaMultiConfig/LongCommandLine-release-config-build-stdout.txt
new file mode 100644
index 0000000..628b6bc
--- /dev/null
+++ b/Tests/RunCMake/NinjaMultiConfig/LongCommandLine-release-config-build-stdout.txt
@@ -0,0 +1,2 @@
+
+Post-build Debug Release \.*$
diff --git a/Tests/RunCMake/NinjaMultiConfig/LongCommandLine.cmake b/Tests/RunCMake/NinjaMultiConfig/LongCommandLine.cmake
index 00aa896..de528be 100644
--- a/Tests/RunCMake/NinjaMultiConfig/LongCommandLine.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/LongCommandLine.cmake
@@ -14,3 +14,10 @@ add_custom_target(
ALL
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/gen.txt"
)
+
+add_executable(exe main.c)
+
+add_custom_command(
+ TARGET exe POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E echo "Post-build $<CONFIG> $<COMMAND_CONFIG:$<CONFIG>> ${very_long}"
+ )
diff --git a/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake b/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
index aa42739..e7acbc2 100644
--- a/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
@@ -198,8 +198,11 @@ 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)
+set(RunCMake_TEST_OPTIONS "-DCMAKE_CROSS_CONFIGS=all")
run_cmake_configure(LongCommandLine)
+unset(RunCMake_TEST_OPTIONS)
run_cmake_build(LongCommandLine release Release custom)
+run_cmake_build(LongCommandLine release-config Release exe:Debug)
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/Framework-build)
set(RunCMake_TEST_OPTIONS "-DCMAKE_CROSS_CONFIGS=all")