mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-14 02:08:27 +08:00
Tests: Fix ConfigSources test with empty CMAKE_BUILD_TYPE
The test requires a non-empty `CMAKE_BUILD_TYPE` to function on single-config generators. Force a non-empty configuration if the test is configured explicitly with empty `-DCMAKE_BUILD_TYPE=`.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
||||
if(NOT _isMultiConfig AND NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build")
|
||||
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build" FORCE)
|
||||
endif()
|
||||
project(ConfigSources CXX)
|
||||
|
||||
|
Reference in New Issue
Block a user