summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-02-05 14:10:59 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-02-05 14:11:10 (GMT)
commit56ddef613d2bf4c23ad40ef6f2102b515bbef3a3 (patch)
tree8751851e362c2bd9e316c4cda67a185299b6655a /Tests/RunCMake
parent94be195a5462f4d15e722333263f9a2eef09458f (diff)
parentbd4ae2af0fe00813919c8188da7bb07d57ef3734 (diff)
downloadCMake-56ddef613d2bf4c23ad40ef6f2102b515bbef3a3.zip
CMake-56ddef613d2bf4c23ad40ef6f2102b515bbef3a3.tar.gz
CMake-56ddef613d2bf4c23ad40ef6f2102b515bbef3a3.tar.bz2
Merge topic 'ninja-multi-cmake-build-no-config'
bd4ae2af0f Help: Make note of ninja -f argument in Ninja Multi-Config docs 79e5b3c46a Help: Explain new behavior of cmake --build in Ninja Multi-Config 16a4ba5b31 Ninja Multi-Config: Use build.ninja if cmake --build has no --config 2ac835b9f9 Refactor: Allow generators to decide default configuration for build Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4323
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake10
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/SimpleDefaultBuildAliasList-all-configs-build-check.cmake (renamed from Tests/RunCMake/NinjaMultiConfig/SimpleDefaultBuildAliasList-all-configs-ninja-check.cmake)0
2 files changed, 8 insertions, 2 deletions
diff --git a/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake b/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
index 7518395..2344158 100644
--- a/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
@@ -62,7 +62,12 @@ function(run_cmake_build case suffix config)
foreach(tgt IN LISTS ARGN)
list(APPEND tgts --target ${tgt})
endforeach()
- run_cmake_command(${case}-${suffix}-build "${CMAKE_COMMAND}" --build . --config ${config} ${tgts})
+ if(config)
+ set(config_arg --config ${config})
+ else()
+ set(config_arg)
+ endif()
+ run_cmake_command(${case}-${suffix}-build "${CMAKE_COMMAND}" --build . ${config_arg} ${tgts})
endfunction()
function(run_ninja case suffix file)
@@ -122,7 +127,8 @@ run_cmake_configure(SimpleDefaultBuildAliasList)
unset(RunCMake_TEST_OPTIONS)
include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake)
run_ninja(SimpleDefaultBuildAliasList target-configs build.ninja simpleexe)
-run_ninja(SimpleDefaultBuildAliasList all-configs build.ninja all)
+# IMPORTANT: This tests cmake --build . with no config using build.ninja
+run_cmake_build(SimpleDefaultBuildAliasList all-configs "" all)
run_ninja(SimpleDefaultBuildAliasList all-relwithdebinfo build.ninja all:RelWithDebInfo)
run_ninja(SimpleDefaultBuildAliasList clean-configs build.ninja clean)
diff --git a/Tests/RunCMake/NinjaMultiConfig/SimpleDefaultBuildAliasList-all-configs-ninja-check.cmake b/Tests/RunCMake/NinjaMultiConfig/SimpleDefaultBuildAliasList-all-configs-build-check.cmake
index 8ffdd20..8ffdd20 100644
--- a/Tests/RunCMake/NinjaMultiConfig/SimpleDefaultBuildAliasList-all-configs-ninja-check.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/SimpleDefaultBuildAliasList-all-configs-build-check.cmake