From b2f380a4f34c2a93120ccc5e62a946f8a7a1fda5 Mon Sep 17 00:00:00 2001 From: Andrew Hutchings Date: Tue, 20 Sep 2016 15:36:22 -0500 Subject: [PATCH 1/2] MCOL-303 fix performance issue Between 1.0.1 and 1.0.2 there were chnages to the build system which allow for different build options with CMake. Unfortunately the default was not set correctly so the default build was not optimised. This change allows for the default build to be optimised again. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9f27e309a..a9fdbdc02 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,7 +30,7 @@ MESSAGE(STATUS "Running cmake version ${CMAKE_VERSION}") OPTION(COMMUNITY_BUILD "Set to true if this is a community build" ON) SET(CMAKE_BUILD_TYPE RELWITHDEBINFO CACHE STRING - "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel") + "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel" FORCE) #set( CMAKE_VERBOSE_MAKEFILE on ) From d6366d9ee590b2e85e65d466cb54be2d95398d53 Mon Sep 17 00:00:00 2001 From: Andrew Hutchings Date: Tue, 20 Sep 2016 16:13:29 -0500 Subject: [PATCH 2/2] Make the CMAKE_BUILD_TYPE work with user setting --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a9fdbdc02..49605d589 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,8 +29,10 @@ MESSAGE(STATUS "Running cmake version ${CMAKE_VERSION}") # custom packaging steps. OPTION(COMMUNITY_BUILD "Set to true if this is a community build" ON) -SET(CMAKE_BUILD_TYPE RELWITHDEBINFO CACHE STRING - "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel" FORCE) +IF(NOT CMAKE_BUILD_TYPE) + SET(CMAKE_BUILD_TYPE RELWITHDEBINFO CACHE STRING + "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel" FORCE) +ENDIF(NOT CMAKE_BUILD_TYPE) #set( CMAKE_VERBOSE_MAKEFILE on )