summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri.staessens@ugent.be>2017-11-15 12:49:24 +0100
committerSander Vrijders <sander.vrijders@ugent.be>2017-11-15 12:58:30 +0100
commit5e47a3ca4c13934bfc990595ae99aa7ed42ed0f8 (patch)
treed04f864e3acf697d5b20ce7d06c183aba5a15c92 /CMakeLists.txt
parent197fb8504c51df4fdf0e7837b11d1aed2872e2da (diff)
downloadouroboros-5e47a3ca4c13934bfc990595ae99aa7ed42ed0f8.tar.gz
ouroboros-5e47a3ca4c13934bfc990595ae99aa7ed42ed0f8.zip
build: Set defaults for prefix and build type
This defaults the CMAKE install prefix to "/". It also sets the default build type to "Release". Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1a5e4a94..c6295107 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,6 +15,14 @@ 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 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()