CMAKE_BUILD_TYPE set to Release by default: improved

This commit is contained in:
Vitaliy Kirsanov 2019-04-30 14:46:12 +03:00 committed by Erik de Castro Lopo
parent 29fadb6e47
commit 26cbd97884
1 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.0)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
if(NOT (CMAKE_BUILD_TYPE OR CMAKE_CONFIGURATION_TYPES OR DEFINED ENV{CFLAGS} OR DEFINED ENV{CXXFLAGS}))
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo")
endif()
project(FLAC VERSION 1.3.2) # HOMEPAGE_URL "https://www.xiph.org/flac/")