summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2023-02-17 12:07:02 +0100
committerSimon Rettberg2023-02-17 12:07:02 +0100
commit4dcd7c2e4658790965116bb73c6ec459b41ec767 (patch)
tree7128e22d1e241ef0602c5fdfe48ff929be22fa8d
parentTry to get password from pwdaemon (diff)
downloadprintergui-4dcd7c2e4658790965116bb73c6ec459b41ec767.tar.gz
printergui-4dcd7c2e4658790965116bb73c6ec459b41ec767.tar.xz
printergui-4dcd7c2e4658790965116bb73c6ec459b41ec767.zip
cmake: Update a bit
-rw-r--r--CMakeLists.txt12
1 files changed, 8 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d8f662f..fa6fe78 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,14 +1,18 @@
################################################################################
# General
################################################################################
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0)
+
+set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CONFIGURATION_TYPES Debug Release)
+if(NOT CMAKE_BUILD_TYPE)
+ set(CMAKE_BUILD_TYPE Release)
+ message(STATUS "Build type is not set. Defaulting to ${CMAKE_BUILD_TYPE} build!")
+endif(NOT CMAKE_BUILD_TYPE)
PROJECT(printergui)
-CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0)
# set compiler optimizations for debug and release
-IF (CMAKE_BUILD_TYPE STREQUAL "")
- SET(CMAKE_BUILD_TYPE Debug)
-ENDIF()
SET(CMAKE_C_FLAGS_DEBUG "-O0 -g -Wall -Wunused -Wunreachable-code -pedantic -fno-strict-aliasing -std=c++11")
SET(CMAKE_C_FLAGS_RELEASE "-O2 -fno-strict-aliasing -std=c++11")
SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -Wall -Wunused -Wunreachable-code -pedantic -fno-strict-aliasing -std=c++11")