summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CTest/RunCMakeTest.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-10-15 14:36:21 (GMT)
committerBrad King <brad.king@kitware.com>2020-10-15 14:53:09 (GMT)
commitb9cb1d324d500e5b26afee33b6cd565e02117319 (patch)
treec7fe8eb4f2a003296e2755a24673defa01a64a1d /Tests/RunCMake/CTest/RunCMakeTest.cmake
parentb1d9a25f35a22f41b2c1b87725f091936711a28c (diff)
downloadCMake-b9cb1d324d500e5b26afee33b6cd565e02117319.zip
CMake-b9cb1d324d500e5b26afee33b6cd565e02117319.tar.gz
CMake-b9cb1d324d500e5b26afee33b6cd565e02117319.tar.bz2
Fix regression in test/install/package configuration selection
In commit 7a969fe21d (cmMakefile: Refactor API to better handle empty config values, 2020-06-30, v3.19.0-rc1~567^2), calls to `GetGeneratorConfigs` that pass `OnlyMultiConfig` only want to get any configurations listed if the generator is multi-config. Fix the implementation to actually do that. Fixes: #21316
Diffstat (limited to 'Tests/RunCMake/CTest/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/CTest/RunCMakeTest.cmake11
1 files changed, 11 insertions, 0 deletions
diff --git a/Tests/RunCMake/CTest/RunCMakeTest.cmake b/Tests/RunCMake/CTest/RunCMakeTest.cmake
index 62606f8..ffc8f78 100644
--- a/Tests/RunCMake/CTest/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CTest/RunCMakeTest.cmake
@@ -27,3 +27,14 @@ function(run_TestfileErrors)
run_cmake_command(TestfileErrors-test ${CMAKE_CTEST_COMMAND} -C Debug)
endfunction()
run_TestfileErrors()
+
+function(run_SingleConfig)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/SingleConfig-build)
+ run_cmake(SingleConfig)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ run_cmake_command(SingleConfig-build ${CMAKE_COMMAND} --build .)
+ run_cmake_command(SingleConfig-test ${CMAKE_CTEST_COMMAND}) # No -C Debug required for single-config.
+endfunction()
+if(NOT RunCMake_GENERATOR_IS_MULTI_CONFIG)
+ run_SingleConfig()
+endif()