Title: [202056] trunk/Tools
Revision
202056
Author
[email protected]
Date
2016-06-14 11:51:44 -0700 (Tue, 14 Jun 2016)

Log Message

REGRESSION (r202020): El Capitan CMake Debug build broken
<https://webkit.org/b/158743>

Reviewed by Alex Christensen.

The bug was that pure C++ source files (and Objective-C source
files) were being compiled as Objective-C++ source files.  This
is obviously incorrect, so the fix was to split out the list of
source files by language, then define compiler switches based on
each file type.

* DumpRenderTree/PlatformMac.cmake: Replace add_definitions()
with separate foreach loops that set compiler flags based on
each source file's type.
(TestNetscapePlugin_ObjCpp_SOURCES): Rename from
TestNetscapePlugin_SOURCES.
(TestNetscapePlugin_SOURCES): Create based on
${TestNetscapePlugin_ObjCpp_SOURCES}.
(DumpRenderTree_ObjC_SOURCES): Split from DumpRenderTree_SOURCES.
(DumpRenderTree_Cpp_SOURCES): Ditto.
(DumpRenderTree_ObjCpp_SOURCES): Ditto.
(DumpRenderTree_SOURCES): Create from above three lists.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (202055 => 202056)


--- trunk/Tools/ChangeLog	2016-06-14 18:42:17 UTC (rev 202055)
+++ trunk/Tools/ChangeLog	2016-06-14 18:51:44 UTC (rev 202056)
@@ -1,3 +1,28 @@
+2016-06-14  David Kilzer  <[email protected]>
+
+        REGRESSION (r202020): El Capitan CMake Debug build broken
+        <https://webkit.org/b/158743>
+
+        Reviewed by Alex Christensen.
+
+        The bug was that pure C++ source files (and Objective-C source
+        files) were being compiled as Objective-C++ source files.  This
+        is obviously incorrect, so the fix was to split out the list of
+        source files by language, then define compiler switches based on
+        each file type.
+
+        * DumpRenderTree/PlatformMac.cmake: Replace add_definitions()
+        with separate foreach loops that set compiler flags based on
+        each source file's type.
+        (TestNetscapePlugin_ObjCpp_SOURCES): Rename from
+        TestNetscapePlugin_SOURCES.
+        (TestNetscapePlugin_SOURCES): Create based on
+        ${TestNetscapePlugin_ObjCpp_SOURCES}.
+        (DumpRenderTree_ObjC_SOURCES): Split from DumpRenderTree_SOURCES.
+        (DumpRenderTree_Cpp_SOURCES): Ditto.
+        (DumpRenderTree_ObjCpp_SOURCES): Ditto.
+        (DumpRenderTree_SOURCES): Create from above three lists.
+
 2016-06-14  Lucas Forschler  <[email protected]>
 
         <rdar://problem/26685782>

Modified: trunk/Tools/DumpRenderTree/PlatformMac.cmake (202055 => 202056)


--- trunk/Tools/DumpRenderTree/PlatformMac.cmake	2016-06-14 18:42:17 UTC (rev 202055)
+++ trunk/Tools/DumpRenderTree/PlatformMac.cmake	2016-06-14 18:51:44 UTC (rev 202056)
@@ -24,8 +24,6 @@
     WebKit2
 )
 
-add_definitions("-ObjC++ -std=c++11")
-
 if ("${CURRENT_OSX_VERSION}" MATCHES "10.9")
 set(WEBKITSYSTEMINTERFACE_LIBRARY libWebKitSystemInterfaceMavericks.a)
 elif ("${CURRENT_OSX_VERSION}" MATCHES "10.10")
@@ -49,31 +47,42 @@
     ${WTF_DIR}/icu
 )
 
-list(APPEND TestNetscapePlugin_SOURCES
+list(APPEND TestNetscapePlugin_ObjCpp_SOURCES
     TestNetscapePlugIn/PluginObjectMac.mm
 )
 
-list(APPEND DumpRenderTree_SOURCES
+set(TestNetscapePlugin_SOURCES ${TestNetscapePlugin_ObjCpp_SOURCES})
+
+list(APPEND DumpRenderTree_ObjC_SOURCES
     DefaultPolicyDelegate.m
     DumpRenderTreeFileDraggingSource.m
 
+    mac/AppleScriptController.m
+    mac/DumpRenderTreePasteboard.m
+    mac/NavigationController.m
+    mac/ObjCController.m
+    mac/ObjCPlugin.m
+    mac/ObjCPluginFunction.m
+    mac/TextInputController.m
+)
+
+list(APPEND DumpRenderTree_Cpp_SOURCES
     cf/WebArchiveDumpSupport.cpp
 
     cg/PixelDumpSupportCG.cpp
 
-    mac/AccessibilityCommonMac.h
+    mac/CheckedMalloc.cpp
+)
+
+list(APPEND DumpRenderTree_ObjCpp_SOURCES
     mac/AccessibilityCommonMac.mm
     mac/AccessibilityControllerMac.mm
-    mac/AccessibilityNotificationHandler.h
     mac/AccessibilityNotificationHandler.mm
     mac/AccessibilityTextMarkerMac.mm
     mac/AccessibilityUIElementMac.mm
-    mac/AppleScriptController.m
-    mac/CheckedMalloc.cpp
     mac/DumpRenderTree.mm
     mac/DumpRenderTreeDraggingInfo.mm
     mac/DumpRenderTreeMain.mm
-    mac/DumpRenderTreePasteboard.m
     mac/DumpRenderTreeWindow.mm
     mac/EditingDelegate.mm
     mac/EventSendingController.mm
@@ -82,20 +91,29 @@
     mac/HistoryDelegate.mm
     mac/MockGeolocationProvider.mm
     mac/MockWebNotificationProvider.mm
-    mac/NavigationController.m
-    mac/ObjCController.m
-    mac/ObjCPlugin.m
-    mac/ObjCPluginFunction.m
     mac/PixelDumpSupportMac.mm
     mac/PolicyDelegate.mm
     mac/ResourceLoadDelegate.mm
     mac/TestRunnerMac.mm
-    mac/TextInputController.m
     mac/UIDelegate.mm
     mac/WebArchiveDumpSupportMac.mm
     mac/WorkQueueItemMac.mm
 )
 
+set(DumpRenderTree_SOURCES ${DumpRenderTree_ObjC_SOURCES} ${DumpRenderTree_ObjCpp_SOURCES} ${DumpRenderTree_Cpp_Sources})
+
+foreach (_file ${DumpRenderTree_ObjC_SOURCES})
+    set_source_files_properties(${_file} PROPERTIES COMPILE_FLAGS "-std=c99")
+endforeach ()
+
+foreach (_file ${DumpRenderTree_Cpp_SOURCES})
+    set_source_files_properties(${_file} PROPERTIES COMPILE_FLAGS "-std=c++14")
+endforeach ()
+
+foreach (_file ${DumpRenderTree_ObjCpp_SOURCES} ${TestNetscapePlugin_ObjCpp_SOURCES})
+    set_source_files_properties(${_file} PROPERTIES COMPILE_FLAGS "-ObjC++ -std=c++14")
+endforeach ()
+
 set(DumpRenderTree_RESOURCES
     AHEM____.TTF
     FontWithFeatures.otf
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to