Title: [134057] trunk
Revision
134057
Author
commit-qu...@webkit.org
Date
2012-11-09 06:03:14 -0800 (Fri, 09 Nov 2012)

Log Message

[EFL] Enable -Werror for the EFL port
https://bugs.webkit.org/show_bug.cgi?id=98715

Patch by Laszlo Gombos <l.gom...@samsung.com> on 2012-11-09
Reviewed by Gyuyoung Kim.

Treat all warnings as errors, except the existing warnings in the
current code base ("unused-parameter", "sign-compare" and "switch").

Thanks for Raphael Kubo da Costa for the extra help.

* Source/CMakeLists.txt: Enable warnings as error for all libraries
(except WebKit and WebKit2) for the EFL port.
Other cmake-based ports are welcome to join.

* Source/cmake/WebKitHelpers.cmake: Treat warnings as errors by
default for cmake-based ports when ENABLE_WERROR is set.

Modified Paths

Diff

Modified: trunk/ChangeLog (134056 => 134057)


--- trunk/ChangeLog	2012-11-09 13:52:42 UTC (rev 134056)
+++ trunk/ChangeLog	2012-11-09 14:03:14 UTC (rev 134057)
@@ -1,3 +1,22 @@
+2012-11-09  Laszlo Gombos  <l.gom...@samsung.com>
+
+        [EFL] Enable -Werror for the EFL port
+        https://bugs.webkit.org/show_bug.cgi?id=98715
+
+        Reviewed by Gyuyoung Kim.
+
+        Treat all warnings as errors, except the existing warnings in the
+        current code base ("unused-parameter", "sign-compare" and "switch").
+
+        Thanks for Raphael Kubo da Costa for the extra help.      
+
+        * Source/CMakeLists.txt: Enable warnings as error for all libraries
+        (except WebKit and WebKit2) for the EFL port. 
+        Other cmake-based ports are welcome to join.
+
+        * Source/cmake/WebKitHelpers.cmake: Treat warnings as errors by
+        default for cmake-based ports when ENABLE_WERROR is set.
+
 2012-11-08  Raphael Kubo da Costa  <raphael.kubo.da.co...@intel.com>
 
         [EFL] Turn WTF_USE_TILED_BACKING_STORE in OptionsEfl.cmake.

Modified: trunk/Source/CMakeLists.txt (134056 => 134057)


--- trunk/Source/CMakeLists.txt	2012-11-09 13:52:42 UTC (rev 134056)
+++ trunk/Source/CMakeLists.txt	2012-11-09 14:03:14 UTC (rev 134057)
@@ -26,12 +26,16 @@
 # -----------------------------------------------------------------------------
 # Set compiler flags for all targets
 # -----------------------------------------------------------------------------
-WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WTF_LIBRARY_NAME})
-WEBKIT_SET_EXTRA_COMPILER_FLAGS(${_javascript_Core_LIBRARY_NAME})
-WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WebCoreTestSupport_LIBRARY_NAME})
+IF (${PORT} STREQUAL "Efl")
+    SET(ADDITIONAL_FLAGS ENABLE_WERROR)
+ENDIF ()
 
+WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WTF_LIBRARY_NAME} ${ADDITIONAL_FLAGS})
+WEBKIT_SET_EXTRA_COMPILER_FLAGS(${_javascript_Core_LIBRARY_NAME} ${ADDITIONAL_FLAGS})
+WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WebCoreTestSupport_LIBRARY_NAME} ${ADDITIONAL_FLAGS})
+
 IF (ENABLE_WEBCORE)
-    WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WebCore_LIBRARY_NAME})
+    WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WebCore_LIBRARY_NAME} ${ADDITIONAL_FLAGS})
 ENDIF ()
 
 IF (ENABLE_WEBKIT)

Modified: trunk/Source/cmake/WebKitHelpers.cmake (134056 => 134057)


--- trunk/Source/cmake/WebKitHelpers.cmake	2012-11-09 13:52:42 UTC (rev 134056)
+++ trunk/Source/cmake/WebKitHelpers.cmake	2012-11-09 14:03:14 UTC (rev 134057)
@@ -2,8 +2,8 @@
 # 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)
-  SET(options IGNORECXX_WARNINGS)
-  CMAKE_PARSE_ARGUMENTS("OPTION" "IGNORECXX_WARNINGS" "" "" ${ARGN})
+  SET(options ENABLE_WERROR IGNORECXX_WARNINGS)
+  CMAKE_PARSE_ARGUMENTS("OPTION" "${options}" "" "" ${ARGN})
   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")
@@ -37,9 +37,14 @@
 
     # Enable warnings by default
     IF (NOT ${OPTION_IGNORECXX_WARNINGS})
-        SET(OLD_COMPILE_FLAGS "-DANOTHER_BRICK_IN_THE -Wall -Wextra -Wcast-align -Wformat-security -Wmissing-format-attribute -Wpointer-arith -Wundef -Wwrite-strings ${OLD_COMPILE_FLAGS}")
+        SET(OLD_COMPILE_FLAGS "-Wall -Wextra -Wcast-align -Wformat-security -Wmissing-format-attribute -Wpointer-arith -Wundef -Wwrite-strings ${OLD_COMPILE_FLAGS}")
     ENDIF ()
 
+    # Enable errors on warning
+    IF (OPTION_ENABLE_WERROR)
+        SET(OLD_COMPILE_FLAGS "${OLD_COMPILE_FLAGS} -Werror -Wno-error=unused-parameter -Wno-error=sign-compare -Wno-error=switch")
+    ENDIF ()
+
     # Disable C++0x compat warnings for GCC >= 4.6.0 until we build
     # cleanly with that.
     IF (NOT ${OPTION_IGNORECXX_WARNINGS} AND NOT ${COMPILER_VERSION} VERSION_LESS "4.6.0")
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to