Title: [215614] trunk
Revision
215614
Author
[email protected]
Date
2017-04-21 10:26:07 -0700 (Fri, 21 Apr 2017)

Log Message

[cmake] WTF target should not have wtf and subdirectries in public interface
https://bugs.webkit.org/show_bug.cgi?id=171115

Reviewed by Michael Catanzaro.

In r209665 WEBCORE_FRAMEWORK macro started to export INCLUDE_DIRECTORIES of
targets as their public interface, so that linked targets can use them
implicitly without copying directory lists around. This matches existing
practice for all targets except WTF, headers from which are always included
with full path starting from "<wtf/...".

Since r209665 it became possible to include headers from wtf or its
subdirectories in CMake builds without using "<wtf/..." path. It should
not be allowed.

.:

* Source/cmake/WebKitMacros.cmake: Support xxx_PRIVATE_HEADERS
CMake variables.

Source/WebCore:

* platform/graphics/texmap/coordinated/TiledBackingStore.cpp: Fix
incorrect include of WTF header.

Source/WTF:

* wtf/CMakeLists.txt: WTF/wtf and its sudirectories should not be in
public include paths of WTF target.

Modified Paths

Diff

Modified: trunk/ChangeLog (215613 => 215614)


--- trunk/ChangeLog	2017-04-21 16:58:49 UTC (rev 215613)
+++ trunk/ChangeLog	2017-04-21 17:26:07 UTC (rev 215614)
@@ -1,3 +1,23 @@
+2017-04-21  Konstantin Tokarev  <[email protected]>
+
+        [cmake] WTF target should not have wtf and subdirectries in public interface
+        https://bugs.webkit.org/show_bug.cgi?id=171115
+
+        Reviewed by Michael Catanzaro.
+
+        In r209665 WEBCORE_FRAMEWORK macro started to export INCLUDE_DIRECTORIES of
+        targets as their public interface, so that linked targets can use them
+        implicitly without copying directory lists around. This matches existing
+        practice for all targets except WTF, headers from which are always included
+        with full path starting from "<wtf/...".
+
+        Since r209665 it became possible to include headers from wtf or its
+        subdirectories in CMake builds without using "<wtf/..." path. It should
+        not be allowed.
+
+        * Source/cmake/WebKitMacros.cmake: Support xxx_PRIVATE_HEADERS
+        CMake variables.
+
 2017-04-20  Konstantin Tokarev  <[email protected]>
 
         [cmake] Define FORWARDING_HEADERS_DIR in WebKitFS and use it everywhere

Modified: trunk/Source/WTF/ChangeLog (215613 => 215614)


--- trunk/Source/WTF/ChangeLog	2017-04-21 16:58:49 UTC (rev 215613)
+++ trunk/Source/WTF/ChangeLog	2017-04-21 17:26:07 UTC (rev 215614)
@@ -1,3 +1,23 @@
+2017-04-21  Konstantin Tokarev  <[email protected]>
+
+        [cmake] WTF target should not have wtf and subdirectries in public interface
+        https://bugs.webkit.org/show_bug.cgi?id=171115
+
+        Reviewed by Michael Catanzaro.
+
+        In r209665 WEBCORE_FRAMEWORK macro started to export INCLUDE_DIRECTORIES of
+        targets as their public interface, so that linked targets can use them
+        implicitly without copying directory lists around. This matches existing
+        practice for all targets except WTF, headers from which are always included
+        with full path starting from "<wtf/...".
+
+        Since r209665 it became possible to include headers from wtf or its
+        subdirectories in CMake builds without using "<wtf/..." path. It should
+        not be allowed.
+
+        * wtf/CMakeLists.txt: WTF/wtf and its sudirectories should not be in
+        public include paths of WTF target.
+
 2017-04-20  Sam Weinig  <[email protected]>
 
         Move notFound into its own file

Modified: trunk/Source/WTF/wtf/CMakeLists.txt (215613 => 215614)


--- trunk/Source/WTF/wtf/CMakeLists.txt	2017-04-21 16:58:49 UTC (rev 215613)
+++ trunk/Source/WTF/wtf/CMakeLists.txt	2017-04-21 17:26:07 UTC (rev 215614)
@@ -286,6 +286,12 @@
 set(WTF_INCLUDE_DIRECTORIES
     "${BMALLOC_DIR}"
     "${WTF_DIR}"
+    "${CMAKE_BINARY_DIR}"
+    "${DERIVED_SOURCES_DIR}"
+    "${THIRDPARTY_DIR}"
+)
+
+set(WTF_PRIVATE_INCLUDE_DIRECTORIES
     "${WTF_DIR}/wtf"
     "${WTF_DIR}/wtf/dtoa"
     "${WTF_DIR}/wtf/persistence"
@@ -293,9 +299,6 @@
     "${WTF_DIR}/wtf/text/icu"
     "${WTF_DIR}/wtf/threads"
     "${WTF_DIR}/wtf/unicode"
-    "${THIRDPARTY_DIR}"
-    "${CMAKE_BINARY_DIR}"
-    "${DERIVED_SOURCES_DIR}"
 )
 
 set(WTF_LIBRARIES

Modified: trunk/Source/WebCore/ChangeLog (215613 => 215614)


--- trunk/Source/WebCore/ChangeLog	2017-04-21 16:58:49 UTC (rev 215613)
+++ trunk/Source/WebCore/ChangeLog	2017-04-21 17:26:07 UTC (rev 215614)
@@ -1,3 +1,23 @@
+2017-04-21  Konstantin Tokarev  <[email protected]>
+
+        [cmake] WTF target should not have wtf and subdirectries in public interface
+        https://bugs.webkit.org/show_bug.cgi?id=171115
+
+        Reviewed by Michael Catanzaro.
+
+        In r209665 WEBCORE_FRAMEWORK macro started to export INCLUDE_DIRECTORIES of
+        targets as their public interface, so that linked targets can use them
+        implicitly without copying directory lists around. This matches existing
+        practice for all targets except WTF, headers from which are always included
+        with full path starting from "<wtf/...".
+
+        Since r209665 it became possible to include headers from wtf or its
+        subdirectories in CMake builds without using "<wtf/..." path. It should
+        not be allowed.
+
+        * platform/graphics/texmap/coordinated/TiledBackingStore.cpp: Fix
+        incorrect include of WTF header.
+
 2017-04-21  Gwang Yoon Hwang  <[email protected]>
 
         Do not paint the border of the box if the dirty region does not intersect with border area

Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/TiledBackingStore.cpp (215613 => 215614)


--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/TiledBackingStore.cpp	2017-04-21 16:58:49 UTC (rev 215613)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/TiledBackingStore.cpp	2017-04-21 17:26:07 UTC (rev 215614)
@@ -22,9 +22,9 @@
 
 #if USE(COORDINATED_GRAPHICS)
 #include "GraphicsContext.h"
-#include "MemoryPressureHandler.h"
 #include "TiledBackingStoreClient.h"
 #include <wtf/CheckedArithmetic.h>
+#include <wtf/MemoryPressureHandler.h>
 
 namespace WebCore {
 

Modified: trunk/Source/cmake/WebKitMacros.cmake (215613 => 215614)


--- trunk/Source/cmake/WebKitMacros.cmake	2017-04-21 16:58:49 UTC (rev 215613)
+++ trunk/Source/cmake/WebKitMacros.cmake	2017-04-21 17:26:07 UTC (rev 215614)
@@ -283,6 +283,7 @@
         ${${_target}_SOURCES}
     )
     target_include_directories(${_target} PUBLIC "$<BUILD_INTERFACE:${${_target}_INCLUDE_DIRECTORIES}>")
+    target_include_directories(${_target} PRIVATE "$<BUILD_INTERFACE:${${_target}_PRIVATE_INCLUDE_DIRECTORIES}>")
     target_link_libraries(${_target} ${${_target}_LIBRARIES})
     set_target_properties(${_target} PROPERTIES COMPILE_DEFINITIONS "BUILDING_${_target}")
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to