From 096d6800df750d8d28ec979dc542f17443f45a13 Mon Sep 17 00:00:00 2001 From: Patrick Brosi Date: Tue, 17 Oct 2023 14:42:28 +0200 Subject: [PATCH] bump required cmake to 3.1, use CMAKE_CXX_STANDARD to require C++-11 --- CMakeLists.txt | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6a9880e..a90940b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,5 @@ -cmake_minimum_required (VERSION 2.8.12) +cmake_minimum_required (VERSION 3.1) +set(CMAKE_CXX_STANDARD 11) project (pfaedle) @@ -25,22 +26,6 @@ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS} -g -DLOGLEVEL=3") # export compile commands to tools like clang set(CMAKE_EXPORT_COMPILE_COMMANDS ON) -# Compiler-specific C++11 activation. -if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") - execute_process( - COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) - if ((GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8)) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") - else () - message(FATAL_ERROR "${PROJECT_NAME} requires g++ 4.8 or greater!") - endif () -elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") - #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -std=c++11") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") -else () - message(FATAL_ERROR "Your C++ compiler does not support C++11.") -endif () - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DPFAEDLE_PRECISION=${PFAEDLE_PRECISION}") find_package(LibZip)