⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 118640 in webkit


Ignore:
Timestamp:
May 27, 2012, 6:56:44 PM (14 years ago)
Author:
rakuco@webkit.org
Message:

[CMake] Make WEBKIT_SET_EXTRA_COMPILER_FLAGS work with clang.
https://bugs.webkit.org/show_bug.cgi?id=87597

Reviewed by Daniel Bates.

Building with clang requires at least the -fPIC option being
passed correctly, just like it is needed with gcc. clang is also
compatible with most of gcc's compiler options, so we only need to
check for clang besides g++ in the macro definition.

  • Source/cmake/WebKitHelpers.cmake: Check for "Clang" and use

CMAKE_COMPILER_IS_GNUCXX for the previous check, as it is shorter
and achieves the same effect.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r118550 r118640  
     12012-05-27  Raphael Kubo da Costa  <rakuco@webkit.org>
     2
     3        [CMake] Make WEBKIT_SET_EXTRA_COMPILER_FLAGS work with clang.
     4        https://bugs.webkit.org/show_bug.cgi?id=87597
     5
     6        Reviewed by Daniel Bates.
     7
     8        Building with clang requires at least the -fPIC option being
     9        passed correctly, just like it is needed with gcc. clang is also
     10        compatible with most of gcc's compiler options, so we only need to
     11        check for clang besides g++ in the macro definition.
     12
     13        * Source/cmake/WebKitHelpers.cmake: Check for "Clang" and use
     14        CMAKE_COMPILER_IS_GNUCXX for the previous check, as it is shorter
     15        and achieves the same effect.
     16
    1172012-05-25  Zan Dobersek  <zandobersek@gmail.com>
    218
  • trunk/Source/cmake/WebKitHelpers.cmake

    r111769 r118640  
    22# Currently, only GCC is supported.
    33MACRO(WEBKIT_SET_EXTRA_COMPILER_FLAGS _target)
    4   IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
     4  IF (CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
    55    GET_TARGET_PROPERTY(OLD_COMPILE_FLAGS ${_target} COMPILE_FLAGS)
    66    IF (${OLD_COMPILE_FLAGS} STREQUAL "OLD_COMPILE_FLAGS-NOTFOUND")
Note: See TracChangeset for help on using the changeset viewer.