summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2021-11-06 16:43:04 -0400
committerEdward Thomson <ethomson@edwardthomson.com>2021-11-11 15:56:10 -0500
commit207beff5414a44bcde41535a905e51d5b774330b (patch)
treec81b8cc74bab31582bd73dd7ab717409e65184b5 /CMakeLists.txt
parent4d2a6839dc5b020b26ab8209952d95411eb34da5 (diff)
downloadlibgit2-207beff5414a44bcde41535a905e51d5b774330b.tar.gz
cmake: reorganize file
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt18
1 files changed, 5 insertions, 13 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5421bd731..23d09682d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -80,6 +80,10 @@ if(WIN32)
option(USE_WINHTTP "Use Win32 WinHTTP routines" ON)
endif()
+if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
+ set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE)
+endif()
+
# Modules
@@ -99,19 +103,6 @@ include(FeatureSummary)
include(EnableWarnings)
include(DefaultCFlags)
-#
-# Compiler / linker flags
-#
-
-if(NOT CMAKE_CONFIGURATION_TYPES)
- # Build Debug by default
- if(NOT CMAKE_BUILD_TYPE)
- set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE)
- endif()
-else()
- # Using a multi-configuration generator eg MSVC or Xcode
- # that uses CMAKE_CONFIGURATION_TYPES and not CMAKE_BUILD_TYPE
-endif()
#
# Subdirectories
@@ -135,6 +126,7 @@ if(BUILD_FUZZERS)
add_subdirectory(fuzzers)
endif()
+
# Summary
feature_summary(WHAT ENABLED_FEATURES DESCRIPTION "Enabled features:")