From 4ad71a84ee9e3febce25bbe46b01a1dfd9dc883c Mon Sep 17 00:00:00 2001 From: Jens Date: Thu, 15 Apr 2021 15:28:46 +0200 Subject: [PATCH] Make C++ standard more explicit (#44) --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 05e1f46..3a1d34f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,11 @@ # minimum version of CMake is 3.12 cmake_minimum_required(VERSION 3.12 FATAL_ERROR) +include(CheckCXXCompilerFlag) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) #...without compiler extensions like gnu++11 + #build type if(NOT CMAKE_BUILD_TYPE) message(STATUS "No build type specified. Will build Release")