From 500c62bd380e52e13972f4c2971346d9ab1e63ed Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 10 Nov 2014 13:45:16 -0800 Subject: Properly set default build type in CMakeLists.txt. --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 350aeae..44c125a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,10 @@ set(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_ add_subdirectory(src) -set(CMAKE_BUILD_TYPE Release) +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "Release" CACHE STRING + "Choose the type of build, options are: Debug Release." FORCE) +endif(NOT CMAKE_BUILD_TYPE) set(CPACK_GENERATOR TGZ ZIP) if(WIN32 AND NOT CYGWIN) -- cgit v1.2.3