CMake: Require C++14 support

CMake now supports compiler features (including language level), so
we can directly require C++14 instead of testing for compiler-
specific flags.
master
Nicolas Hake 2018-12-31 12:15:49 +01:00
parent b702f1583c
commit 15f4a06cd4
1 changed files with 1 additions and 6 deletions

View File

@ -55,13 +55,8 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ${PROJECT_FOLDERS})
############################################################################
include(CheckCXXCompilerFlag)
# Required for CMake >= 3.1.0 and Qt >= 5.7
set(CMAKE_CXX_STANDARD 14)
CHECK_CXX_COMPILER_FLAG("-std=gnu++14" USE_GCC_STD_14)
if(USE_GCC_STD_14)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++14")
endif()
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Enable link-time code generation. We have to do this manually because while
# there is a INTERPROCEDURAL_OPTIMIZATION cmake flag, it's only implemented