summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@ugent.be>2017-11-15 13:50:16 +0100
committerDimitri Staessens <dimitri.staessens@ugent.be>2017-11-15 13:59:26 +0100
commit4fc4cac512f990e1bfe0afc8a33f95a7d67d6762 (patch)
tree89f4de5f9d358986613286866ef7387678f3e61a /CMakeLists.txt
parent3d8c53bb3708867c77456138c5190b4797d9186b (diff)
downloadouroboros-4fc4cac512f990e1bfe0afc8a33f95a7d67d6762.tar.gz
ouroboros-4fc4cac512f990e1bfe0afc8a33f95a7d67d6762.zip
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 <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 4 insertions, 3 deletions
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()