summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeOnly
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2020-02-05 18:32:04 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2020-02-06 16:07:38 (GMT)
commit9e219de4fb50096a9386dbe6de9f98cf8a7ec199 (patch)
tree0ea9983da347a69958da346acb242b888bc36acd /Tests/CMakeOnly
parent13ef3285df97fa97a4cc1b7fe81741aeb8adcf7a (diff)
downloadCMake-9e219de4fb50096a9386dbe6de9f98cf8a7ec199.zip
CMake-9e219de4fb50096a9386dbe6de9f98cf8a7ec199.tar.gz
CMake-9e219de4fb50096a9386dbe6de9f98cf8a7ec199.tar.bz2
Ninja Multi-Config: Don't include MinSizeRel by default
Diffstat (limited to 'Tests/CMakeOnly')
-rw-r--r--Tests/CMakeOnly/CheckStructHasMember/CMakeLists.txt6
-rw-r--r--Tests/CMakeOnly/Test.cmake.in8
2 files changed, 11 insertions, 3 deletions
diff --git a/Tests/CMakeOnly/CheckStructHasMember/CMakeLists.txt b/Tests/CMakeOnly/CheckStructHasMember/CMakeLists.txt
index a584505..859ec41 100644
--- a/Tests/CMakeOnly/CheckStructHasMember/CMakeLists.txt
+++ b/Tests/CMakeOnly/CheckStructHasMember/CMakeLists.txt
@@ -6,7 +6,7 @@ set(CMAKE_REQUIRED_INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}")
include(CheckStructHasMember)
-foreach(_config_type Release RelWithDebInfo MinSizeRel Debug)
+foreach(_config_type Release RelWithDebInfo Debug)
set(CMAKE_TRY_COMPILE_CONFIGURATION ${_config_type})
unset(CSHM_RESULT_S1_${_config_type} CACHE)
unset(CSHM_RESULT_S2_${_config_type} CACHE)
@@ -26,7 +26,7 @@ foreach(_config_type Release RelWithDebInfo MinSizeRel Debug)
endif()
endforeach()
-foreach(_config_type Release RelWithDebInfo MinSizeRel Debug)
+foreach(_config_type Release RelWithDebInfo Debug)
set(CMAKE_TRY_COMPILE_CONFIGURATION ${_config_type})
unset(CSHM_RESULT_S1_${_config_type}_C CACHE)
unset(CSHM_RESULT_S2_${_config_type}_C CACHE)
@@ -46,7 +46,7 @@ foreach(_config_type Release RelWithDebInfo MinSizeRel Debug)
endif()
endforeach()
-foreach(_config_type Release RelWithDebInfo MinSizeRel Debug)
+foreach(_config_type Release RelWithDebInfo Debug)
set(CMAKE_TRY_COMPILE_CONFIGURATION ${_config_type})
unset(CSHM_RESULT_S1_${_config_type}_CXX CACHE)
unset(CSHM_RESULT_S2_${_config_type}_CXX CACHE)
diff --git a/Tests/CMakeOnly/Test.cmake.in b/Tests/CMakeOnly/Test.cmake.in
index 0ae8af1..c531e8b 100644
--- a/Tests/CMakeOnly/Test.cmake.in
+++ b/Tests/CMakeOnly/Test.cmake.in
@@ -7,6 +7,13 @@ if(make_program)
set(maybe_make_program "-DCMAKE_MAKE_PROGRAM=${make_program}")
endif()
+set(_isMultiConfig "@_isMultiConfig@")
+if(_isMultiConfig)
+ set(cfg_opts "-DCMAKE_CONFIGURATION_TYPES=Debug\\;Release\\;RelWithDebInfo")
+else()
+ set(cfg_opts)
+endif()
+
set(source_dir "@CMAKE_CURRENT_SOURCE_DIR@/${TEST_SOURCE}")
set(binary_dir "@CMAKE_CURRENT_BINARY_DIR@/${TEST}-build")
file(REMOVE_RECURSE "${binary_dir}")
@@ -16,6 +23,7 @@ execute_process(
"${source_dir}" -G "@CMAKE_GENERATOR@"
-A "@CMAKE_GENERATOR_PLATFORM@"
-T "@CMAKE_GENERATOR_TOOLSET@"
+ ${cfg_opts}
${maybe_make_program}
WORKING_DIRECTORY "${binary_dir}"
RESULT_VARIABLE result