diff --git a/CMakeLists.txt b/CMakeLists.txt index 795cdc2fd..321cfc263 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,9 +8,10 @@ else() set(EXTRA_MAGICDBS "" CACHE STRING "List of compiled magicdb files separated with a :") endif() -if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE "Release" CACHE FORCE) -endif(NOT CMAKE_BUILD_TYPE) +if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Using Release build type as it was left unset" FORCE) + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release") +endif() set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules")