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)