From e8155d67b0e13de3a5cbaec63c8a3ea6e6231e36 Mon Sep 17 00:00:00 2001 From: Eugene Kliuchnikov Date: Thu, 9 Jul 2020 15:35:57 +0200 Subject: CMake: change default ("") build type to Release (#818) Fix #817 --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) 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__) -- cgit v1.1