diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2021-04-30 18:45:19 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2021-04-30 18:46:21 (GMT) |
commit | ad08f93ee40a1cc855c403c1cc738237511224e3 (patch) | |
tree | db5dfa5149698d1001b1fd3de65d4ffe15439f83 /Tests/RunCMake/NinjaMultiConfig | |
parent | 1ad4501ae97fb6c6deab096ff0ac7e03d554e26d (diff) | |
download | CMake-ad08f93ee40a1cc855c403c1cc738237511224e3.zip CMake-ad08f93ee40a1cc855c403c1cc738237511224e3.tar.gz CMake-ad08f93ee40a1cc855c403c1cc738237511224e3.tar.bz2 |
Ninja Multi-Config: Split long command lines by config
Fixes: #22123
Diffstat (limited to 'Tests/RunCMake/NinjaMultiConfig')
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") |