From 5e47a3ca4c13934bfc990595ae99aa7ed42ed0f8 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Wed, 15 Nov 2017 12:49:24 +0100 Subject: 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 Signed-off-by: Sander Vrijders --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) 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() -- cgit v1.2.3