CMake: change default ("") build type to Release (#818)

Fix #817
This commit is contained in:
Eugene Kliuchnikov 2020-07-09 15:35:57 +02:00 committed by GitHub
parent fc823290a7
commit e8155d67b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,6 +6,13 @@ cmake_minimum_required(VERSION 2.8.6)
project(brotli C)
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to Release as none was specified.")
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build." FORCE)
else()
message(STATUS "Build type is '${CMAKE_BUILD_TYPE}'")
endif()
include(CheckCSourceCompiles)
check_c_source_compiles(
"#if defined(__EMSCRIPTEN__)