From ecf8f2f28aad5f0f7969bc2da71a6474d7b1646c Mon Sep 17 00:00:00 2001 From: Manuel Nickschas Date: Fri, 6 Feb 2015 19:59:58 +0100 Subject: [PATCH] Filter -ansi from CMAKE_CXX_FLAGS This was set by older versions of KDE 4 and negates -std=c++11. --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9fe8bf55..2c2ff026 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -425,6 +425,11 @@ if (MINGW AND NOT KDE4_FOUND) add_definitions(-U__STRICT_ANSI__) endif() +# Sanitize compiler flags - old versions of KDE set -ansi, which breaks -std=c++11 +if (CMAKE_COMPILER_IS_GNUCXX) + string(REPLACE "-ansi" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) +endif() + # Setup KDE / KDE Frameworks ##################################################################### -- 2.20.1