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
This commit is contained in:
Martin Gräßlin 2017-02-07 20:49:22 +01:00
parent 16647c3a3c
commit 1a9ece7cd4

View file

@ -48,12 +48,8 @@ include(ECMOptionalAddSubdirectory)
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0 -DQT_USE_QSTRINGBUILDER) add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0 -DQT_USE_QSTRINGBUILDER)
# require at least gcc 4.8 set(CMAKE_CXX_STANDARD 11)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") set(CMAKE_CXX_STANDARD_REQUIRED ON)
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()
find_package(Qt5Multimedia QUIET) find_package(Qt5Multimedia QUIET)
set_package_properties(Qt5Multimedia PROPERTIES set_package_properties(Qt5Multimedia PROPERTIES