Changeset 222494 in webkit


Ignore:
Timestamp:
Sep 26, 2017 12:05:46 AM (7 years ago)
Author:
zandobersek@gmail.com
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:
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r222452 r222494  
     12017-09-26  Zan Dobersek  <zdobersek@igalia.com>
     2
     3        [CMake] Use implicit include directories for Clang as well
     4        https://bugs.webkit.org/show_bug.cgi?id=177426
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        In WebKitCompilerFlags.cmake, also gather and use the system
     9        include directories for C and C++ build targets when compiling
     10        with Clang. This fixes compilation errors when cross-building
     11        WebKit with a Clang-based toolchain.
     12
     13        COMPILER_IS_GCC_OR_CLANG is used to check for GCC or Clang
     14        compilers. That only checks for the C++ compiler, but it's not
     15        reasonable to expect two widely different compilers being used
     16        for C and C++ compilation.
     17
     18        * Source/cmake/WebKitCompilerFlags.cmake:
     19
    1202017-09-25  Timothy Horton  <timothy_horton@apple.com>
    221
  • trunk/Source/cmake/WebKitCompilerFlags.cmake

    r222112 r222494  
    194194endmacro()
    195195
    196 if (CMAKE_COMPILER_IS_GNUCC)
     196if (COMPILER_IS_GCC_OR_CLANG)
    197197   DETERMINE_GCC_SYSTEM_INCLUDE_DIRS("c" "${CMAKE_C_COMPILER}" "${CMAKE_C_FLAGS}" SYSTEM_INCLUDE_DIRS)
    198198   set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES ${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES} ${SYSTEM_INCLUDE_DIRS})
    199 endif ()
    200 
    201 if (CMAKE_COMPILER_IS_GNUCXX)
    202199   DETERMINE_GCC_SYSTEM_INCLUDE_DIRS("c++" "${CMAKE_CXX_COMPILER}" "${CMAKE_CXX_FLAGS}" SYSTEM_INCLUDE_DIRS)
    203200   set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES ${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES} ${SYSTEM_INCLUDE_DIRS})
Note: See TracChangeset for help on using the changeset viewer.