1
0
mirror of synced 2024-12-01 02:37:18 +01:00

Fixed cmake error when build type was left unset

This commit is contained in:
WerWolv 2021-01-11 08:46:51 +01:00
parent bb3e0c126f
commit 9b7b782020

View File

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