[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [amarok] /: Fix compilation with Clang and libstdc++.
From:       Mark Kretschmann <kretschmann () kde ! org>
Date:       2013-10-27 13:36:49
Message-ID: E1VaQWP-0007t1-7v () scm ! kde ! org
[Download RAW message or body]

Git commit 880aa6d918993c7466d7a89f98f13b1bd396ccd6 by Mark Kretschmann.
Committed on 27/10/2013 at 13:33.
Pushed by markey into branch 'master'.

Fix compilation with Clang and libstdc++.

Workaround for Clang bug http://llvm.org/bugs/show_bug.cgi?id=15651.

We have to disable -fdelayed-template-parsing which is added by
FindKDE4Internal.cmake. Currently compilation would fail with this
flag in combination with libstdc++.

M  +9    -2    CMakeLists.txt

http://commits.kde.org/amarok/880aa6d918993c7466d7a89f98f13b1bd396ccd6

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 754bc36..4ffee3a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,8 +16,6 @@ option(WITH_PLAYGROUND "Enable building of playground scripts and applets (WARNI
 include(CheckLibraryExists)
 check_library_exists(dl dlopen "" LIBDL_FOUND)
 
-SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")  # Require C++11
-
 
 ############### Taglib
 set(TAGLIB_MIN_VERSION "1.7")
@@ -89,6 +87,15 @@ include_directories(
 find_package( Qt4 4.8.3 COMPONENTS QtCore QtGui QtScript QtSvg QtXml QtWebKit REQUIRED )
 find_package( KDE4 4.8.4 REQUIRED )
 
+
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")  # Require C++11
+
+# WORKAROUND for Clang bug: http://llvm.org/bugs/show_bug.cgi?id=15651
+if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-delayed-template-parsing")
+endif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+
+
 include( KDE4Defaults )
 include( MacroBoolTo01 )
 include( MacroLibrary )
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic