[CMake] Ignore warnings in system headers
authormcatanzaro@igalia.com <mcatanzaro@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 May 2015 01:35:57 +0000 (01:35 +0000)
committermcatanzaro@igalia.com <mcatanzaro@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 May 2015 01:35:57 +0000 (01:35 +0000)
https://bugs.webkit.org/show_bug.cgi?id=144747

Reviewed by Darin Adler.

.:

Require CMake 2.8.12 when compiling the GTK+ port. This is because we use the
target_include_directories command (added in 2.8.11) in GTK-specific cmake files, and also
use the SYSTEM argument to the command (added in 2.8.12).

* CMakeLists.txt:

Source/JavaScriptCore:

Separate include directories into WebKit project includes and system includes. Suppress all
warnings from headers in system include directories using the SYSTEM argument to
the include_directories command.

* CMakeLists.txt:
* PlatformGTK.cmake:

Source/WebCore:

Separate include directories into WebKit project includes and system includes. Suppress all
warnings from headers in system include directories using the SYSTEM argument to
the include_directories command.

* CMakeLists.txt:
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* PlatformMac.cmake:

Source/WebKit:

Separate include directories into WebKit project includes and system includes. Suppress all
warnings from headers in system include directories using the SYSTEM argument to
the include_directories command.

* CMakeLists.txt:
* PlatformMac.cmake:

Source/WebKit2:

Separate include directories into WebKit project includes and system includes. Suppress all
warnings from headers in system include directories using the SYSTEM argument to
the include_directories command.

* CMakeLists.txt:
* PlatformEfl.cmake:
* PlatformGTK.cmake:

Source/WTF:

Separate include directories into WebKit project includes and system includes. Suppress all
warnings from headers in system include directories using the SYSTEM argument to
the include_directories command.

* wtf/CMakeLists.txt:
* wtf/PlatformEfl.cmake:
* wtf/PlatformGTK.cmake:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@184536 268f45cc-cd09-0410-ab3c-d52691b4dbfc

21 files changed:
CMakeLists.txt
ChangeLog
Source/JavaScriptCore/CMakeLists.txt
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/PlatformGTK.cmake
Source/WTF/ChangeLog
Source/WTF/wtf/CMakeLists.txt
Source/WTF/wtf/PlatformEfl.cmake
Source/WTF/wtf/PlatformGTK.cmake
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/PlatformEfl.cmake
Source/WebCore/PlatformGTK.cmake
Source/WebCore/PlatformMac.cmake
Source/WebKit/CMakeLists.txt
Source/WebKit/ChangeLog
Source/WebKit/PlatformMac.cmake
Source/WebKit2/CMakeLists.txt
Source/WebKit2/ChangeLog
Source/WebKit2/PlatformEfl.cmake
Source/WebKit2/PlatformGTK.cmake

index 8b9361f..a040612 100644 (file)
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.8)
+cmake_minimum_required(VERSION 2.8.12)
 project(WebKit)
 
 # -----------------------------------------------------------------------------
index 759fc25..585dee1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2015-05-18  Michael Catanzaro  <mcatanzaro@igalia.com>
+
+        [CMake] Ignore warnings in system headers
+        https://bugs.webkit.org/show_bug.cgi?id=144747
+
+        Reviewed by Darin Adler.
+
+        Require CMake 2.8.12 when compiling the GTK+ port. This is because we use the
+        target_include_directories command (added in 2.8.11) in GTK-specific cmake files, and also
+        use the SYSTEM argument to the command (added in 2.8.12). 
+
+        * CMakeLists.txt:
+
 2015-05-14  Michael Catanzaro  <mcatanzaro@igalia.com>
 
         [CMake] Error out when ruby is too old
index 7e2b184..3e622a0 100644 (file)
@@ -33,7 +33,10 @@ set(JavaScriptCore_INCLUDE_DIRECTORIES
     "${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}"
     "${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector"
     "${CMAKE_SOURCE_DIR}/Source"
-    ${ICU_INCLUDE_DIRS}
+)
+
+set(JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES
+    "${ICU_INCLUDE_DIRS}"
 )
 
 set(JavaScriptCore_SOURCES
@@ -836,7 +839,7 @@ if (ENABLE_FTL_JIT)
     target_link_libraries(llvmForJSC ${LLVM_STATIC_LIBRARIES} "pthread" "dl" -Wl,--version-script=${JAVASCRIPTCORE_DIR}/llvm/library/libllvmForJSC.version)
 
     # Added extra items for JavaScriptCore
-    list(APPEND JavaScriptCore_INCLUDE_DIRECTORIES
+    list(APPEND JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES
         ${LLVM_INCLUDE_DIRS}
     )
 
@@ -1186,6 +1189,7 @@ add_subdirectory(shell)
 
 WEBKIT_WRAP_SOURCELIST(${JavaScriptCore_SOURCES})
 include_directories(${JavaScriptCore_INCLUDE_DIRECTORIES})
+include_directories(SYSTEM ${JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES})
 add_library(JavaScriptCore ${JavaScriptCore_LIBRARY_TYPE} ${JavaScriptCore_HEADERS} ${JavaScriptCore_SOURCES})
 target_link_libraries(JavaScriptCore ${JavaScriptCore_LIBRARIES})
 set_target_properties(JavaScriptCore PROPERTIES COMPILE_DEFINITIONS "BUILDING_JavaScriptCore")
index 88af54a..61d56e8 100644 (file)
@@ -1,3 +1,17 @@
+2015-05-18  Michael Catanzaro  <mcatanzaro@igalia.com>
+
+        [CMake] Ignore warnings in system headers
+        https://bugs.webkit.org/show_bug.cgi?id=144747
+
+        Reviewed by Darin Adler.
+
+        Separate include directories into WebKit project includes and system includes. Suppress all
+        warnings from headers in system include directories using the SYSTEM argument to
+        the include_directories command.
+
+        * CMakeLists.txt:
+        * PlatformGTK.cmake:
+
 2015-05-18  Skachkov Alexandr  <gskachkov@gmail.com>
 
         [ES6] Arrow function syntax. Feature flag for arrow function
index c7d86e0..6f94a29 100644 (file)
@@ -39,6 +39,6 @@ add_definitions(-DSTATICALLY_LINKED_WITH_WTF)
 list(APPEND JavaScriptCore_LIBRARIES
     ${GLIB_LIBRARIES}
 )
-list(APPEND JavaScriptCore_INCLUDE_DIRECTORIES
+list(APPEND JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES
     ${GLIB_INCLUDE_DIRS}
 )
index ca0071b..5e50a36 100644 (file)
@@ -1,3 +1,18 @@
+2015-05-18  Michael Catanzaro  <mcatanzaro@igalia.com>
+
+        [CMake] Ignore warnings in system headers
+        https://bugs.webkit.org/show_bug.cgi?id=144747
+
+        Reviewed by Darin Adler.
+
+        Separate include directories into WebKit project includes and system includes. Suppress all
+        warnings from headers in system include directories using the SYSTEM argument to
+        the include_directories command.
+
+        * wtf/CMakeLists.txt:
+        * wtf/PlatformEfl.cmake:
+        * wtf/PlatformGTK.cmake:
+
 2015-05-18  Myles C. Maxfield  <mmaxfield@apple.com>
 
         Addressing post-review comments on r184353
index 2364dce..ef3a140 100644 (file)
@@ -227,7 +227,7 @@ endif ()
 list(APPEND WTF_SOURCES
     unicode/icu/CollatorICU.cpp
 )
-list(APPEND WTF_INCLUDE_DIRECTORIES
+set(WTF_SYSTEM_INCLUDE_DIRECTORIES
     ${ICU_INCLUDE_DIRS}
 )
 list(APPEND WTF_LIBRARIES
@@ -256,6 +256,7 @@ WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
 
 WEBKIT_WRAP_SOURCELIST(${WTF_SOURCES})
 include_directories(${WTF_INCLUDE_DIRECTORIES})
+include_directories(SYSTEM ${WTF_SYSTEM_INCLUDE_DIRECTORIES})
 add_library(WTF ${WTF_LIBRARY_TYPE} ${WTF_HEADERS} ${WTF_SOURCES})
 target_link_libraries(WTF ${WTF_LIBRARIES})
 set_target_properties(WTF PROPERTIES COMPILE_DEFINITIONS "BUILDING_WTF")
index 472bc80..4c3131d 100644 (file)
@@ -19,6 +19,9 @@ list(APPEND WTF_LIBRARIES
 
 list(APPEND WTF_INCLUDE_DIRECTORIES
     "${WTF_DIR}/wtf/efl"
+)
+
+list(APPEND WTF_SYSTEM_INCLUDE_DIRECTORIES
     ${ECORE_EVAS_INCLUDE_DIRS}
     ${ECORE_IMF_INCLUDE_DIRS}
     ${ECORE_INCLUDE_DIRS}
index ebafef5..be5cd82 100644 (file)
@@ -20,6 +20,6 @@ list(APPEND WTF_LIBRARIES
     ${ZLIB_LIBRARIES}
 )
 
-list(APPEND WTF_INCLUDE_DIRECTORIES
+list(APPEND WTF_SYSTEM_INCLUDE_DIRECTORIES
     ${GLIB_INCLUDE_DIRS}
 )
index b120baf..7a9c423 100644 (file)
@@ -129,6 +129,9 @@ set(WebCore_INCLUDE_DIRECTORIES
     "${DERIVED_SOURCES_WEBCORE_DIR}"
     "${CMAKE_SOURCE_DIR}/Source"
     "${CMAKE_BINARY_DIR}"
+)
+
+set(WebCore_SYSTEM_INCLUDE_DIRECTORIES
     ${ICU_INCLUDE_DIRS}
 )
 
@@ -3000,14 +3003,14 @@ if (ENABLE_GRAPHICS_CONTEXT_3D)
     # For platforms that want to use system-provided OpenGL (ES) headers,
     # these include directories need to be added before the ANGLE directories.
     if (OPENGL_FOUND)
-        list(APPEND WebCore_INCLUDE_DIRECTORIES
+        list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
             ${OPENGL_INCLUDE_DIR}
         )
         list(APPEND WebCore_LIBRARIES
             ${OPENGL_gl_LIBRARY}
         )
     elseif (OPENGLES2_FOUND)
-        list(APPEND WebCore_INCLUDE_DIRECTORIES
+        list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
             ${OPENGLES2_INCLUDE_DIR}
         )
         list(APPEND WebCore_LIBRARIES
@@ -3521,6 +3524,7 @@ WEBKIT_WRAP_SOURCELIST(${WebCore_IDL_FILES} ${WebCore_SOURCES})
 WEBKIT_WRAP_SOURCELIST(${WebCoreTestSupport_IDL_FILES} ${WebCoreTestSupport_SOURCES})
 
 include_directories(${WebCore_INCLUDE_DIRECTORIES} ${WebCoreTestSupport_INCLUDE_DIRECTORIES})
+include_directories(SYSTEM ${WebCore_SYSTEM_INCLUDE_DIRECTORIES})
 
 if (MSVC)
     ADD_PRECOMPILED_HEADER("WebCorePrefix.h" "WebCorePrefix.cpp" WebCore_SOURCES)
@@ -3549,12 +3553,9 @@ endif ()
 if (ENABLE_GRAPHICS_CONTEXT_3D)
     add_library(ANGLESupport STATIC ${ANGLESupport_SOURCES})
     set_target_properties(ANGLESupport PROPERTIES FOLDER "WebCore")
-    set_property(
-        TARGET ANGLESupport
-        APPEND
-        PROPERTY INCLUDE_DIRECTORIES
-            "${THIRDPARTY_DIR}/ANGLE/include"
-            "${THIRDPARTY_DIR}/ANGLE/src"
+    target_include_directories(ANGLESupport PRIVATE
+        "${THIRDPARTY_DIR}/ANGLE/include"
+        "${THIRDPARTY_DIR}/ANGLE/src"
     )
     list(APPEND WebCore_LIBRARIES ANGLESupport)
     WEBKIT_SET_EXTRA_COMPILER_FLAGS(ANGLESupport IGNORECXX_WARNINGS)
index 8c2b9a0..df4234f 100644 (file)
@@ -1,3 +1,19 @@
+2015-05-18  Michael Catanzaro  <mcatanzaro@igalia.com>
+
+        [CMake] Ignore warnings in system headers
+        https://bugs.webkit.org/show_bug.cgi?id=144747
+
+        Reviewed by Darin Adler.
+
+        Separate include directories into WebKit project includes and system includes. Suppress all
+        warnings from headers in system include directories using the SYSTEM argument to
+        the include_directories command.
+
+        * CMakeLists.txt:
+        * PlatformEfl.cmake:
+        * PlatformGTK.cmake:
+        * PlatformMac.cmake:
+
 2015-05-18  Myles C. Maxfield  <mmaxfield@apple.com>
 
         Addressing post-review comments on r184353
index b0520f5..691a597 100644 (file)
@@ -314,7 +314,7 @@ list(APPEND WebCore_LIBRARIES
     ${ZLIB_LIBRARIES}
 )
 
-list(APPEND WebCore_INCLUDE_DIRECTORIES
+list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
     ${CAIRO_INCLUDE_DIRS}
     ${ECORE_INCLUDE_DIRS}
     ${ECORE_EVAS_INCLUDE_DIRS}
@@ -340,7 +340,7 @@ list(APPEND WebCore_INCLUDE_DIRECTORIES
 )
 
 if (ENABLE_MEDIA_STREAM)
-    list(APPEND WebCore_INCLUDE_DIRECTORIES
+    list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
         ${OPENWEBRTC_INCLUDE_DIRS}
     )
     list(APPEND WebCore_LIBRARIES
@@ -351,7 +351,9 @@ endif ()
 if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
     list(APPEND WebCore_INCLUDE_DIRECTORIES
         "${WEBCORE_DIR}/platform/graphics/gstreamer"
+    )
 
+    list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
         ${GSTREAMER_INCLUDE_DIRS}
         ${GSTREAMER_BASE_INCLUDE_DIRS}
         ${GSTREAMER_APP_INCLUDE_DIRS}
@@ -370,7 +372,7 @@ if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
 endif ()
 
 if (ENABLE_VIDEO)
-    list(APPEND WebCore_INCLUDE_DIRECTORIES
+    list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
         ${GSTREAMER_TAG_INCLUDE_DIRS}
         ${GSTREAMER_VIDEO_INCLUDE_DIRS}
     )
@@ -380,7 +382,7 @@ if (ENABLE_VIDEO)
     )
 
     if (USE_GSTREAMER_MPEGTS)
-        list(APPEND WebCore_INCLUDE_DIRECTORIES
+        list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
             ${GSTREAMER_MPEGTS_INCLUDE_DIRS}
         )
 
@@ -391,7 +393,7 @@ if (ENABLE_VIDEO)
 endif ()
 
 if (USE_EGL)
-    list(APPEND WebCore_INCLUDE_DIRECTORIES
+    list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
         ${EGL_INCLUDE_DIR}
         "${WEBCORE_DIR}/platform/graphics/surfaces/egl"
     )
@@ -440,7 +442,9 @@ endif ()
 if (ENABLE_WEB_AUDIO)
     list(APPEND WebCore_INCLUDE_DIRECTORIES
         "${WEBCORE_DIR}/platform/audio/gstreamer"
+    )
 
+    list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
         ${GSTREAMER_AUDIO_INCLUDE_DIRS}
         ${GSTREAMER_FFT_INCLUDE_DIRS}
     )
@@ -454,7 +458,7 @@ if (ENABLE_WEB_AUDIO)
 endif ()
 
 if (ENABLE_SPELLCHECK)
-    list(APPEND WebCore_INCLUDE_DIRECTORIES
+    list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
         ${ENCHANT_INCLUDE_DIRS}
     )
     list(APPEND WebCore_LIBRARIES
@@ -465,6 +469,8 @@ endif ()
 if (ENABLE_ACCESSIBILITY)
     list(APPEND WebCore_INCLUDE_DIRECTORIES
         "${WEBCORE_DIR}/accessibility/atk"
+    )
+    list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
         ${ATK_INCLUDE_DIRS}
     )
     list(APPEND WebCore_LIBRARIES
@@ -473,7 +479,7 @@ if (ENABLE_ACCESSIBILITY)
 endif ()
 
 if (ENABLE_SPEECH_SYNTHESIS)
-    list(APPEND WebCore_INCLUDE_DIRECTORIES
+    list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
         ${ESPEAK_INCLUDE_DIRS}
     )
     list(APPEND WebCore_LIBRARIES
@@ -523,7 +529,7 @@ if (ENABLE_SUBTLE_CRYPTO)
         crypto/keys/CryptoKeySerializationRaw.cpp
     )
 
-    list(APPEND WebCore_INCLUDE_DIRECTORIES
+    list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
         ${GNUTLS_INCLUDE_DIRS}
     )
     list(APPEND WebCore_LIBRARIES
index 1f9f3bc..09b5a68 100644 (file)
@@ -287,7 +287,7 @@ list(APPEND WebCore_LIBRARIES
     ${ZLIB_LIBRARIES}
 )
 
-list(APPEND WebCore_INCLUDE_DIRECTORIES
+list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
     ${ATK_INCLUDE_DIRS}
     ${CAIRO_INCLUDE_DIRS}
     ${ENCHANT_INCLUDE_DIRS}
@@ -309,6 +309,9 @@ list(APPEND WebCore_INCLUDE_DIRECTORIES
 if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
     list(APPEND WebCore_INCLUDE_DIRECTORIES
         ${WEBCORE_DIR}/platform/graphics/gstreamer
+    )
+
+    list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
         ${GSTREAMER_INCLUDE_DIRS}
         ${GSTREAMER_BASE_INCLUDE_DIRS}
         ${GSTREAMER_APP_INCLUDE_DIRS}
@@ -327,7 +330,7 @@ if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
 endif ()
 
 if (ENABLE_VIDEO)
-    list(APPEND WebCore_INCLUDE_DIRECTORIES
+    list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
         ${GSTREAMER_TAG_INCLUDE_DIRS}
         ${GSTREAMER_VIDEO_INCLUDE_DIRS}
     )
@@ -337,7 +340,7 @@ if (ENABLE_VIDEO)
     )
 
     if (USE_GSTREAMER_MPEGTS)
-        list(APPEND WebCore_INCLUDE_DIRECTORIES
+        list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
             ${GSTREAMER_MPEGTS_INCLUDE_DIRS}
         )
 
@@ -347,7 +350,7 @@ if (ENABLE_VIDEO)
     endif ()
 
     if (USE_GSTREAMER_GL)
-        list(APPEND WebCore_INCLUDE_DIRECTORIES
+        list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
             ${GSTREAMER_GL_INCLUDE_DIRS}
         )
 
@@ -358,7 +361,7 @@ if (ENABLE_VIDEO)
 endif ()
 
 if (ENABLE_WEB_AUDIO)
-    list(APPEND WebCore_INCLUDE_DIRECTORIES
+    list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
         ${WEBCORE_DIR}/platform/audio/gstreamer
         ${GSTREAMER_AUDIO_INCLUDE_DIRS}
         ${GSTREAMER_FFT_INCLUDE_DIRS}
@@ -369,7 +372,7 @@ if (ENABLE_WEB_AUDIO)
 endif ()
 
 if (ENABLE_MEDIA_STREAM)
-    list(APPEND WebCore_INCLUDE_DIRECTORIES
+    list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
         ${OPENWEBRTC_INCLUDE_DIRS}
     )
     list(APPEND WebCore_LIBRARIES
@@ -449,13 +452,13 @@ if (ENABLE_PLUGIN_PROCESS_GTK2)
         APPEND
         PROPERTY COMPILE_DEFINITIONS GTK_API_VERSION_2=1
     )
-    set_property(
-        TARGET WebCorePlatformGTK2
-        APPEND
-        PROPERTY INCLUDE_DIRECTORIES
-            ${WebCore_INCLUDE_DIRECTORIES}
-            ${GTK2_INCLUDE_DIRS}
-            ${GDK2_INCLUDE_DIRS}
+    target_include_directories(WebCorePlatformGTK2 PRIVATE
+        ${WebCore_INCLUDE_DIRECTORIES}
+        ${GTK2_INCLUDE_DIRS}
+        ${GDK2_INCLUDE_DIRS}
+    )
+    target_include_directories(WebCorePlatformGTK2 SYSTEM PRIVATE
+        ${WebCore_SYSTEM_INCLUDE_DIRECTORIES}
     )
     target_link_libraries(WebCorePlatformGTK2
          ${WebCore_LIBRARIES}
@@ -482,7 +485,7 @@ if (ENABLE_WAYLAND_TARGET)
         ${DERIVED_SOURCES_WEBCORE_DIR}/WebKitGtkWaylandClientProtocol.c
     )
 
-    list(APPEND WebCore_INCLUDE_DIRECTORIES
+    list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
         ${WAYLAND_INCLUDE_DIRS}
     )
     list(APPEND WebCore_LIBRARIES
@@ -493,13 +496,13 @@ endif ()
 add_library(WebCorePlatformGTK ${WebCore_LIBRARY_TYPE} ${WebCorePlatformGTK_SOURCES})
 add_dependencies(WebCorePlatformGTK WebCore)
 WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCorePlatformGTK)
-set_property(
-    TARGET WebCorePlatformGTK
-    APPEND
-    PROPERTY INCLUDE_DIRECTORIES
-        ${WebCore_INCLUDE_DIRECTORIES}
-        ${GTK_INCLUDE_DIRS}
-        ${GDK_INCLUDE_DIRS}
+target_include_directories(WebCorePlatformGTK PRIVATE
+    ${WebCore_INCLUDE_DIRECTORIES}
+)
+target_include_directories(WebCorePlatformGTK SYSTEM PRIVATE
+    ${WebCore_SYSTEM_INCLUDE_DIRECTORIES}
+    ${GTK_INCLUDE_DIRS}
+    ${GDK_INCLUDE_DIRS}
 )
 target_link_libraries(WebCorePlatformGTK
     ${WebCore_LIBRARIES}
@@ -514,6 +517,10 @@ include_directories(
     "${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}"
 )
 
+include_directories(SYSTEM
+    ${WebCore_SYSTEM_INCLUDE_DIRECTORIES}
+)
+
 list(APPEND GObjectDOMBindings_SOURCES
     bindings/gobject/ConvertToUTF8String.cpp
     bindings/gobject/DOMObjectCache.cpp
@@ -917,7 +924,7 @@ if (ENABLE_SUBTLE_CRYPTO)
         crypto/keys/CryptoKeySerializationRaw.cpp
     )
 
-    list(APPEND WebCore_INCLUDE_DIRECTORIES
+    list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
         ${GNUTLS_INCLUDE_DIRS}
     )
     list(APPEND WebCore_LIBRARIES
index 054aa54..4c29079 100644 (file)
@@ -34,7 +34,9 @@ list(APPEND WebCore_INCLUDE_DIRECTORIES
     "${WEBCORE_DIR}/platform/spi/cocoa"
     "${WEBCORE_DIR}/platform/spi/mac"
     "${WEBCORE_DIR}/plugins/mac"
+)
 
+list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
     "/usr/include/libxslt"
     "/usr/include/libxml2"
 )
index 9b2f91f..5991728 100644 (file)
@@ -14,6 +14,8 @@ set(WebKit_INCLUDE_DIRECTORIES
     "${WTF_DIR}"
 )
 
+set(WebKit_SYSTEM_INCLUDE_DIRECTORIES "")
+
 set(WebKit_LIBRARIES
     JavaScriptCore
     WTF
@@ -23,6 +25,7 @@ set(WebKit_LIBRARIES
 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
 
 include_directories(${WebKit_INCLUDE_DIRECTORIES})
+include_directories(SYSTEM ${WebKit_SYSTEM_INCLUDE_DIRECTORIES})
 
 if (MSVC)
     ADD_PRECOMPILED_HEADER("WebKitPrefix.h" "win/WebKitPrefix.cpp" WebKit_SOURCES)
index 454dbbc..3f3add8 100644 (file)
@@ -1,3 +1,17 @@
+2015-05-18  Michael Catanzaro  <mcatanzaro@igalia.com>
+
+        [CMake] Ignore warnings in system headers
+        https://bugs.webkit.org/show_bug.cgi?id=144747
+
+        Reviewed by Darin Adler.
+
+        Separate include directories into WebKit project includes and system includes. Suppress all
+        warnings from headers in system include directories using the SYSTEM argument to
+        the include_directories command.
+
+        * CMakeLists.txt:
+        * PlatformMac.cmake:
+
 2015-05-11  Brent Fulgham  <bfulgham@apple.com>
 
         [Win] Move Windows build target to Windows 7 (or newer)
index 8f2ab53..7f0a183 100644 (file)
@@ -51,7 +51,6 @@ list(APPEND WebKit_INCLUDE_DIRECTORIES
     "${DERIVED_SOURCES_WEBCORE_DIR}"
     "${DERIVED_SOURCES_WEBKITLEGACY_DIR}"
     "${JAVASCRIPTCORE_DIR}/dfg"
-    "${PDFKIT_INCLUDE_DIRECTORY}"
     "${WEBCORE_DIR}/accessibility/mac"
     "${WEBCORE_DIR}/bindings/objc"
     "${WEBCORE_DIR}/bridge"
@@ -81,7 +80,11 @@ list(APPEND WebKit_INCLUDE_DIRECTORIES
     "${WEBCORE_DIR}/platform/text/cf"
     "${WEBCORE_DIR}/platform/text/mac"
     "${WEBCORE_DIR}/plugins/mac"
+    ../../WebKitLibraries
+)
 
+list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES
+    "${PDFKIT_INCLUDE_DIRECTORY}"
     mac
     mac/Carbon
     mac/DefaultDelegates
@@ -97,7 +100,6 @@ list(APPEND WebKit_INCLUDE_DIRECTORIES
     mac/WebInspector
     mac/WebView
     Storage
-    ../../WebKitLibraries
 )
 
 list(APPEND WebKit_SOURCES
index 2f50f36..b761642 100644 (file)
@@ -147,6 +147,8 @@ set(WebKit2_INCLUDE_DIRECTORIES
     "${CMAKE_SOURCE_DIR}/Source"
 )
 
+set(WebKit2_SYSTEM_INCLUDE_DIRECTORIES "")
+
 if (ENABLE_GRAPHICS_CONTEXT_3D)
     list(APPEND WebKit2_INCLUDE_DIRECTORIES
         "${THIRDPARTY_DIR}/ANGLE"
@@ -777,6 +779,7 @@ WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
 GENERATE_WEBKIT2_MESSAGE_SOURCES(WebKit2_DERIVED_SOURCES "${WebKit2_MESSAGES_IN_FILES}")
 
 include_directories(${WebKit2_INCLUDE_DIRECTORIES})
+include_directories(SYSTEM ${WebKit2_SYSTEM_INCLUDE_DIRECTORIES})
 add_library(WebKit2 ${WebKit2_LIBRARY_TYPE} ${WebKit2_SOURCES} ${WebKit2_DERIVED_SOURCES})
 
 add_dependencies(WebKit2 WebCore ${WEBKIT2_EXTRA_DEPENDENCIES})
index d7206c8..d75e04d 100644 (file)
@@ -1,3 +1,18 @@
+2015-05-18  Michael Catanzaro  <mcatanzaro@igalia.com>
+
+        [CMake] Ignore warnings in system headers
+        https://bugs.webkit.org/show_bug.cgi?id=144747
+
+        Reviewed by Darin Adler.
+
+        Separate include directories into WebKit project includes and system includes. Suppress all
+        warnings from headers in system include directories using the SYSTEM argument to
+        the include_directories command.
+
+        * CMakeLists.txt:
+        * PlatformEfl.cmake:
+        * PlatformGTK.cmake:
+
 2015-05-18  Csaba Osztrogon√°c  <ossy@webkit.org>
 
         Fix return-type warnings in test_ewk2_color_picker.cpp
index efefebe..59a1ff0 100644 (file)
@@ -258,6 +258,9 @@ list(APPEND WebKit2_INCLUDE_DIRECTORIES
     "${WEBKIT2_DIR}/WebProcess/WebPage/CoordinatedGraphics"
     "${WTF_DIR}/wtf/efl/"
     "${WTF_DIR}/wtf/gobject"
+)
+
+list(APPEND WebKit2_SYSTEM_INCLUDE_DIRECTORIES
     ${CAIRO_INCLUDE_DIRS}
     ${ECORE_EVAS_INCLUDE_DIRS}
     ${ECORE_IMF_EVAS_INCLUDE_DIRS}
@@ -328,7 +331,7 @@ if (ENABLE_SECCOMP_FILTERS)
     list(APPEND WebKit2_LIBRARIES
         ${LIBSECCOMP_LIBRARIES}
     )
-    list(APPEND WebKit2_INCLUDE_DIRECTORIES
+    list(APPEND WebKit2_SYSTEM_INCLUDE_DIRECTORIES
         ${LIBSECCOMP_INCLUDE_DIRS}
     )
 
@@ -539,7 +542,7 @@ if (ENABLE_API_TESTS)
 endif ()
 
 if (ENABLE_SPELLCHECK)
-    list(APPEND WebKit2_INCLUDE_DIRECTORIES
+    list(APPEND WebKit2_SYSTEM_INCLUDE_DIRECTORIES
         ${ENCHANT_INCLUDE_DIRS}
     )
     list(APPEND WebKit2_LIBRARIES
@@ -550,6 +553,8 @@ endif ()
 if (ENABLE_ACCESSIBILITY)
     list(APPEND WebKit2_INCLUDE_DIRECTORIES
         "${WEBKIT2_DIR}/WebProcess/WebPage/atk"
+    )
+    list(APPEND WebKit2_SYSTEM_INCLUDE_DIRECTORIES
         ${ATK_INCLUDE_DIRS}
     )
     list(APPEND WebKit2_LIBRARIES
index fe789d4..2e0b12f 100644 (file)
@@ -486,7 +486,10 @@ list(APPEND WebKit2_INCLUDE_DIRECTORIES
     "${WEBKIT2_DIR}/WebProcess/WebPage/gtk"
     "${WTF_DIR}/wtf/gtk/"
     "${WTF_DIR}/wtf/gobject"
-    ${WTF_DIR}
+    "${WTF_DIR}"
+)
+
+list(APPEND WebKit2_SYSTEM_INCLUDE_DIRECTORIES
     ${CAIRO_INCLUDE_DIRS}
     ${ENCHANT_INCLUDE_DIRS}
     ${GEOCLUE_INCLUDE_DIRS}
@@ -495,14 +498,15 @@ list(APPEND WebKit2_INCLUDE_DIRECTORIES
 )
 
 if (USE_LIBNOTIFY)
-list(APPEND WebKit2_INCLUDE_DIRECTORIES
+list(APPEND WebKit2_SYSTEM_INCLUDE_DIRECTORIES
     ${LIBNOTIFY_INCLUDE_DIRS}
 )
 endif ()
 
 set(WebKit2CommonIncludeDirectories ${WebKit2_INCLUDE_DIRECTORIES})
+set(WebKit2CommonSystemIncludeDirectories ${WebKit2_SYSTEM_INCLUDE_DIRECTORIES})
 
-list(APPEND WebKit2_INCLUDE_DIRECTORIES
+list(APPEND WebKit2_SYSTEM_INCLUDE_DIRECTORIES
     ${GLIB_INCLUDE_DIRS}
     ${GTK_INCLUDE_DIRS}
     ${GTK_UNIX_PRINT_INCLUDE_DIRS}
@@ -745,13 +749,13 @@ if (ENABLE_PLUGIN_PROCESS_GTK2)
         APPEND
         PROPERTY COMPILE_DEFINITIONS GTK_API_VERSION_2=1
     )
-    set_property(
-        TARGET WebKitPluginProcess2
-        APPEND
-        PROPERTY INCLUDE_DIRECTORIES
-            ${WebKit2CommonIncludeDirectories}
-            ${GTK2_INCLUDE_DIRS}
-            ${GDK2_INCLUDE_DIRS}
+    target_include_directories(WebKitPluginProcess2 PRIVATE
+        ${WebKit2CommonIncludeDirectories}
+    )
+    target_include_directories(WebKitPluginProcess2 SYSTEM PRIVATE
+         ${WebKit2CommonSystemIncludeDirectories}
+         ${GTK2_INCLUDE_DIRS}
+         ${GDK2_INCLUDE_DIRS}
     )
 
     set(WebKitPluginProcess2_LIBRARIES