From 4fc4cac512f990e1bfe0afc8a33f95a7d67d6762 Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Wed, 15 Nov 2017 13:50:16 +0100 Subject: build: Fix setting default build type This adds a check and sets the FORCE parameter to override the cmake default build type. Signed-off-by: Sander Vrijders Signed-off-by: Dimitri Staessens --- CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index c6295107..3021c43a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,14 +15,15 @@ set(PACKAGE_URL "http://ouroboros.ilabt.imec.be") set(PACKAGE_BUGREPORT "http://ouroboros.ilabt.imec.be/bugzilla/") set(PACKAGE_VERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}") -set(CMAKE_BUILD_TYPE "Release" CACHE STRING - "Build type (Release, Debug, DebugASan, DebugTSan, DebugLSan)") +if (NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "Release" CACHE STRING + "Build type (Release, Debug, DebugASan, DebugTSan, DebugLSan)" FORCE) +endif() if (NOT APPLE AND CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) set(CMAKE_INSTALL_PREFIX "/" CACHE STRING "Installation Prefix" FORCE) endif () - if (APPLE) set(CMAKE_MACOSX_RPATH 1) endif() -- cgit v1.2.3