Skip to content

Commit 207beff

Browse files
committed
cmake: reorganize file
1 parent 4d2a683 commit 207beff

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

CMakeLists.txt

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ if(WIN32)
8080
option(USE_WINHTTP "Use Win32 WinHTTP routines" ON)
8181
endif()
8282

83+
if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
84+
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE)
85+
endif()
86+
8387

8488
# Modules
8589

@@ -99,19 +103,6 @@ include(FeatureSummary)
99103
include(EnableWarnings)
100104
include(DefaultCFlags)
101105

102-
#
103-
# Compiler / linker flags
104-
#
105-
106-
if(NOT CMAKE_CONFIGURATION_TYPES)
107-
# Build Debug by default
108-
if(NOT CMAKE_BUILD_TYPE)
109-
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE)
110-
endif()
111-
else()
112-
# Using a multi-configuration generator eg MSVC or Xcode
113-
# that uses CMAKE_CONFIGURATION_TYPES and not CMAKE_BUILD_TYPE
114-
endif()
115106

116107
#
117108
# Subdirectories
@@ -135,6 +126,7 @@ if(BUILD_FUZZERS)
135126
add_subdirectory(fuzzers)
136127
endif()
137128

129+
138130
# Summary
139131

140132
feature_summary(WHAT ENABLED_FEATURES DESCRIPTION "Enabled features:")

0 commit comments

Comments
 (0)