cmake: Set default build type to Release

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2019-09-29 13:53:44 +02:00
parent 021f4d553b
commit b3b740eb22

View File

@ -88,6 +88,12 @@ endif()
#
###############################################################################
if(NOT CMAKE_BUILD_TYPE)
message(STATUS "Setting build type to 'Release' as none was specified.")
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release")
endif()
include(CheckCXXCompilerFlag)
# Check for C++ standard to use