From 1a9ece7cd4577fe7b7c7c6793c57960ed229520a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 7 Feb 2017 20:49:22 +0100 Subject: [PATCH] Require C++11 through cmake Summary: This replaces the previous solution to require at least gcc 4.8 which did not cover clang. As cmake has a proper way to check for 11, let's use that. Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D4486 --- CMakeLists.txt | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ada8270ec0..f64ebb831e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,12 +48,8 @@ include(ECMOptionalAddSubdirectory) add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0 -DQT_USE_QSTRINGBUILDER) -# require at least gcc 4.8 -if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") - if ("${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "4.8") - message(SEND_ERROR "Version ${CMAKE_CXX_COMPILER_VERSION} of the ${CMAKE_CXX_COMPILER_ID} C++ compiler is not supported. Please use version 4.8 or later.") - endif() -endif() +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) find_package(Qt5Multimedia QUIET) set_package_properties(Qt5Multimedia PROPERTIES