[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [libkcompactdisc/Applications/15.12] /: Extend -std=c99 compiler flag to clang.
From: Raphael Kubo da Costa <rakuco () FreeBSD ! org>
Date: 2015-11-28 13:31:21
Message-ID: E1a2faz-0003wL-W8 () scm ! kde ! org
[Download RAW message or body]
Git commit d69277128afb60999e420c533e826b0061fc40eb by Raphael Kubo da Costa.
Committed on 28/11/2015 at 13:27.
Pushed by rkcosta into branch 'Applications/15.12'.
Extend -std=c99 compiler flag to clang.
The ALSA headers use features such as the `inline' keyword that require
C99 support. Commit e36c628 ("Fix compilation: ALSA no longer compiles
with -std=c90") started passing it to the compiler when GCC is used.
We now do the same for clang with a better comment, and also append the
flag to the existing CMAKE_C_FLAGS, otherwise we lose several other
options which are set by FindKDE4Internal.cmake.
M +5 -2 CMakeLists.txt
http://commits.kde.org/libkcompactdisc/d69277128afb60999e420c533e826b0061fc40eb
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 030a1b1..e2bf812 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,9 +7,12 @@ include(MacroLibrary)
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
## Compiler flags
-if(CMAKE_COMPILER_IS_GNUCXX)
- set(CMAKE_C_FLAGS "-std=c99") ## ALSA no longer compiles with -std=c90, see \
https://bugzilla.novell.com/show_bug.cgi?id=817077 +if (CMAKE_COMPILER_IS_GNUCXX OR \
CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + # ALSA does not build with the default \
-std=iso9899:1990 from FindKDE4Internal.cmake. + # See \
https://bugzilla.novell.com/show_bug.cgi?id=817077 for more information. + \
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99") endif()
+
find_package(Alsa)
alsa_configure_file(${CMAKE_CURRENT_BINARY_DIR}/config-alsa.h)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic