Skip to content

Commit 5a0152a

Browse files
committed
Only set CMAKE_BUILD_TYPE for single config generators
1 parent c648b03 commit 5a0152a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ endif()
5656

5757
# ====
5858

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

0 commit comments

Comments
 (0)