Skip to content

Commit

Permalink
BUILD: Set CMake build type to Debug if none specified
Browse files Browse the repository at this point in the history
  • Loading branch information
DrMcCoy committed Nov 8, 2024
1 parent bde56b7 commit 0197cdb
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,20 @@ option(Boost_USE_STATIC_LIBS "Use Boost static libraries" OFF)
option(PHAETHON_BUILD_DOCUMENTATION "Use Doxygen to create the HTML based API documentation" OFF)


# -------------------------------------------------------------------------
# default build type

set(default_build_type "Debug")
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to '${default_build_type}' as none was specified.")
set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE
STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
"Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif()


# -------------------------------------------------------------------------
# load some cmake modules from cmake/ subfolder
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
Expand Down

0 comments on commit 0197cdb

Please sign in to comment.