Title: [118640] trunk
Revision
118640
Author
[email protected]
Date
2012-05-27 18:56:44 -0700 (Sun, 27 May 2012)

Log 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.

Modified Paths

Diff

Modified: trunk/ChangeLog (118639 => 118640)


--- trunk/ChangeLog	2012-05-28 01:53:17 UTC (rev 118639)
+++ trunk/ChangeLog	2012-05-28 01:56:44 UTC (rev 118640)
@@ -1,3 +1,19 @@
+2012-05-27  Raphael Kubo da Costa  <[email protected]>
+
+        [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.
+
 2012-05-25  Zan Dobersek  <[email protected]>
 
         configure.ac has duplicated AC_MSG_RESULT([$enable_sandbox]) and nothing for seamless iframes

Modified: trunk/Source/cmake/WebKitHelpers.cmake (118639 => 118640)


--- trunk/Source/cmake/WebKitHelpers.cmake	2012-05-28 01:53:17 UTC (rev 118639)
+++ trunk/Source/cmake/WebKitHelpers.cmake	2012-05-28 01:56:44 UTC (rev 118640)
@@ -1,7 +1,7 @@
 # Sets extra compile flags for a target, depending on the compiler being used.
 # Currently, only GCC is supported.
 MACRO(WEBKIT_SET_EXTRA_COMPILER_FLAGS _target)
-  IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+  IF (CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
     GET_TARGET_PROPERTY(OLD_COMPILE_FLAGS ${_target} COMPILE_FLAGS)
     IF (${OLD_COMPILE_FLAGS} STREQUAL "OLD_COMPILE_FLAGS-NOTFOUND")
         SET(OLD_COMPILE_FLAGS "")
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to