diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2016-09-06 08:20:56 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2016-09-06 08:20:56 +0900 |
commit | 769cb2f694d036e59cfee0c0ce53500f3df822d9 (patch) | |
tree | 19f296a54f81eaf254add38afa12fd6af003f9b1 | |
parent | c02174bc8f09761c2e4ee3ca4a250ce49025343e (diff) | |
download | libquotient-769cb2f694d036e59cfee0c0ce53500f3df822d9.tar.gz libquotient-769cb2f694d036e59cfee0c0ce53500f3df822d9.zip |
Set CMAKE_BUILD_TYPE if none is specified
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e5dae8f..8be4be70 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,15 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) # Instruct CMake to run moc automatically when needed. set(CMAKE_AUTOMOC ON) +# 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 'Debug' as none was specified") + set(CMAKE_BUILD_TYPE Debug 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" + "MinSizeRel" "RelWithDebInfo") +endif() + find_package(Qt5Core 5.2.0) # For JSON (de)serialization find_package(Qt5Network 5.2.0) # For networking find_package(Qt5Gui 5.2.0) # For userpics |