From 4dcd7c2e4658790965116bb73c6ec459b41ec767 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 17 Feb 2023 12:07:02 +0100 Subject: cmake: Update a bit --- CMakeLists.txt | 12 ++++++++---- 1 file 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") -- cgit v1.2.3-55-g7522