diff --git a/CMakeLists.txt b/CMakeLists.txt index 79b4157..3be03fc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)