From 15f4a06cd4ba98e600a93b8bd756fa80f72ac38d Mon Sep 17 00:00:00 2001 From: Nicolas Hake Date: Mon, 31 Dec 2018 12:15:49 +0100 Subject: [PATCH] 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. --- CMakeLists.txt | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 66ecb994a..40305a01f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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