1
0
mirror of synced 2024-11-24 07:40:17 +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 :")
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")