Title: [222494] trunk
Revision
222494
Author
[email protected]
Date
2017-09-26 00:05:46 -0700 (Tue, 26 Sep 2017)

Log Message

[CMake] Use implicit include directories for Clang as well
https://bugs.webkit.org/show_bug.cgi?id=177426

Reviewed by Michael Catanzaro.

In WebKitCompilerFlags.cmake, also gather and use the system
include directories for C and C++ build targets when compiling
with Clang. This fixes compilation errors when cross-building
WebKit with a Clang-based toolchain.

COMPILER_IS_GCC_OR_CLANG is used to check for GCC or Clang
compilers. That only checks for the C++ compiler, but it's not
reasonable to expect two widely different compilers being used
for C and C++ compilation.

* Source/cmake/WebKitCompilerFlags.cmake:

Modified Paths

Diff

Modified: trunk/ChangeLog (222493 => 222494)


--- trunk/ChangeLog	2017-09-26 06:43:42 UTC (rev 222493)
+++ trunk/ChangeLog	2017-09-26 07:05:46 UTC (rev 222494)
@@ -1,3 +1,22 @@
+2017-09-26  Zan Dobersek  <[email protected]>
+
+        [CMake] Use implicit include directories for Clang as well
+        https://bugs.webkit.org/show_bug.cgi?id=177426
+
+        Reviewed by Michael Catanzaro.
+
+        In WebKitCompilerFlags.cmake, also gather and use the system
+        include directories for C and C++ build targets when compiling
+        with Clang. This fixes compilation errors when cross-building
+        WebKit with a Clang-based toolchain.
+
+        COMPILER_IS_GCC_OR_CLANG is used to check for GCC or Clang
+        compilers. That only checks for the C++ compiler, but it's not
+        reasonable to expect two widely different compilers being used
+        for C and C++ compilation.
+
+        * Source/cmake/WebKitCompilerFlags.cmake:
+
 2017-09-25  Timothy Horton  <[email protected]>
 
         Make progress on getting Mac CMake building again

Modified: trunk/Source/cmake/WebKitCompilerFlags.cmake (222493 => 222494)


--- trunk/Source/cmake/WebKitCompilerFlags.cmake	2017-09-26 06:43:42 UTC (rev 222493)
+++ trunk/Source/cmake/WebKitCompilerFlags.cmake	2017-09-26 07:05:46 UTC (rev 222494)
@@ -193,12 +193,9 @@
     endif ()
 endmacro()
 
-if (CMAKE_COMPILER_IS_GNUCC)
+if (COMPILER_IS_GCC_OR_CLANG)
    DETERMINE_GCC_SYSTEM_INCLUDE_DIRS("c" "${CMAKE_C_COMPILER}" "${CMAKE_C_FLAGS}" SYSTEM_INCLUDE_DIRS)
    set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES ${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES} ${SYSTEM_INCLUDE_DIRS})
-endif ()
-
-if (CMAKE_COMPILER_IS_GNUCXX)
    DETERMINE_GCC_SYSTEM_INCLUDE_DIRS("c++" "${CMAKE_CXX_COMPILER}" "${CMAKE_CXX_FLAGS}" SYSTEM_INCLUDE_DIRS)
    set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES ${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES} ${SYSTEM_INCLUDE_DIRS})
 endif ()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to