aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Kliuchnikov <eustas.ru@gmail.com>2020-07-09 15:35:57 +0200
committerGitHub <noreply@github.com>2020-07-09 15:35:57 +0200
commite8155d67b0e13de3a5cbaec63c8a3ea6e6231e36 (patch)
tree9167e1beae9767507349cf4c9314fc6710bac55b
parentfc823290a76a260b7ba6f47ab5f52064a0ce19ff (diff)
downloadbrotli-e8155d67b0e13de3a5cbaec63c8a3ea6e6231e36.zip
brotli-e8155d67b0e13de3a5cbaec63c8a3ea6e6231e36.tar.gz
brotli-e8155d67b0e13de3a5cbaec63c8a3ea6e6231e36.tar.bz2
CMake: change default ("") build type to Release (#818)
Fix #817
-rw-r--r--CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2520278..9956a35 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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__)