Skip to content

Commit c2cbb97

Browse files
authored
Merge pull request #12176 from mnvr/default-to-debug-builds
[CMake] Default to Debug builds
2 parents aacb1ed + a2db72b commit c2cbb97

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,13 @@ option(SWIFT_INCLUDE_DOCS
8585
# TODO: Please categorize these!
8686
#
8787

88+
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
89+
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING
90+
"Build type for Swift [Debug, RelWithDebInfo, Release, MinSizeRel]"
91+
FORCE)
92+
message(STATUS "No build type was specified, will default to ${CMAKE_BUILD_TYPE}")
93+
endif()
94+
8895
set(SWIFT_STDLIB_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING
8996
"Build type for the Swift standard library and SDK overlays [Debug, RelWithDebInfo, Release, MinSizeRel]")
9097
set_property(CACHE SWIFT_STDLIB_BUILD_TYPE PROPERTY

0 commit comments

Comments
 (0)