X-Git-Url: https://git.sthu.org/?a=blobdiff_plain;f=CMakeLists.txt;h=d4bde329b10543a8e2e4777b9469b9615594d1a1;hb=8bd91d327a3ab6dee59f09556c5e93f3144bf2dd;hp=8969cb30776f56573a0ad2ceb95aa9ac4f12924c;hpb=1ee4f2d8184655e56afbeba5b9b7233539e79e24;p=libstick.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 8969cb3..d4bde32 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,13 @@ cmake_minimum_required (VERSION 2.6) project (libstick) +# Set a default build type if none was specified +if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + message(STATUS "Setting build type to 'Release' as none was specified.") + set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE) + # Set the possible values of build type for cmake-gui + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release") +endif() if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -std=c++98 -pedantic") @@ -17,7 +24,7 @@ if(CMAKE_BUILD_TYPE STREQUAL "Release") set(CMAKE_CXX_FLAGS "-O2 ${CMAKE_CXX_FLAGS}") endif() -set(PACKAGE_STRING stick) +set(PACKAGE_STRING libstick) set(PACKAGE_BUGREPORT stefan.huber@ist.ac.at) set(PACKAGE_VERSION 0.1)