From b5156274464466b405a1a9cd88a8cfd9ccf2d667 Mon Sep 17 00:00:00 2001 From: Milo Yip Date: Sun, 31 Jan 2016 01:17:29 +0800 Subject: [PATCH] CMake use RelWithDebInfo as default #319 --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 33f3ef91..fcacbd3c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,9 @@ set(LIB_PATCH_VERSION "2") set(LIB_VERSION_STRING "${LIB_MAJOR_VERSION}.${LIB_MINOR_VERSION}.${LIB_PATCH_VERSION}") # compile in release with debug info mode by default -SET(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Build Type") +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE) +endif() # Build all binaries in a separate directory SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)