Only set CMAKE_BUILD_TYPE for single config generators

This commit is contained in:
Joel Johnson 2019-12-31 15:42:19 -07:00
parent c648b0378a
commit 5a0152ae1b

View File

@ -56,8 +56,8 @@ endif()
# ==== # ====
# Ensures that CMAKE_BUILD_TYPE has a default value # Ensure that CMAKE_BUILD_TYPE has a value specified for single configuration generators.
if(NOT DEFINED CMAKE_BUILD_TYPE) if(NOT DEFINED CMAKE_BUILD_TYPE AND NOT DEFINED CMAKE_CONFIGURATION_TYPES)
set(CMAKE_BUILD_TYPE Release CACHE STRING set(CMAKE_BUILD_TYPE Release CACHE STRING
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel Coverage.") "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel Coverage.")
endif() endif()