Title: [152774] trunk
Revision
152774
Author
[email protected]
Date
2013-07-17 01:37:03 -0700 (Wed, 17 Jul 2013)

Log Message

[CMake] Undefined references should be detected at build time
https://bugs.webkit.org/show_bug.cgi?id=110236

Patch by Balazs Kelemen <[email protected]> on 2013-07-16
Reviewed by Christophe Dumez.

.:

Pass the --no-undefined argument to the linker on platforms where it is available.

* Source/cmake/OptionsCommon.cmake:

Source/WebKit:

Add library dependencies that were not defined explicitly before.

* CMakeLists.txt:
* PlatformEfl.cmake:

Source/WebKit2:

Add library dependencies that were not defined explicitly before.

* CMakeLists.txt:
* PlatformEfl.cmake:

Tools:

Add library dependencies that were not defined explicitly before.

* DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt:
* TestWebKitAPI/CMakeLists.txt:
* WebKitTestRunner/CMakeLists.txt:

Modified Paths

Diff

Modified: trunk/ChangeLog (152773 => 152774)


--- trunk/ChangeLog	2013-07-17 07:27:41 UTC (rev 152773)
+++ trunk/ChangeLog	2013-07-17 08:37:03 UTC (rev 152774)
@@ -1,3 +1,14 @@
+2013-07-16  Balazs Kelemen  <[email protected]>
+
+        [CMake] Undefined references should be detected at build time
+        https://bugs.webkit.org/show_bug.cgi?id=110236
+
+        Reviewed by Christophe Dumez.
+
+        Pass the --no-undefined argument to the linker on platforms where it is available.
+
+        * Source/cmake/OptionsCommon.cmake:
+
 2013-07-16  Carlos Garcia Campos  <[email protected]>
 
         [GTK] Remove compile warnings about GTK+ API deprecated after 3.6

Modified: trunk/Source/WebCore/CMakeLists.txt (152773 => 152774)


--- trunk/Source/WebCore/CMakeLists.txt	2013-07-17 07:27:41 UTC (rev 152773)
+++ trunk/Source/WebCore/CMakeLists.txt	2013-07-17 08:37:03 UTC (rev 152774)
@@ -2959,6 +2959,12 @@
     platform/mock/PlatformSpeechSynthesizerMock.cpp
 )
 
+set(WebCoreTestSupport_LIBRARIES
+    _javascript_Core
+    WTF
+    WebCore
+)
+
 # Modules that the bindings generator scripts may use
 set(SCRIPTS_RESOLVE_SUPPLEMENTAL
     ${WEBCORE_DIR}/bindings/scripts/IDLParser.pm
@@ -3211,15 +3217,13 @@
 endif ()
 
 add_library(WebCoreTestSupport ${WebCoreTestSupport_LIBRARY_TYPE} ${WebCoreTestSupport_SOURCES})
+target_link_libraries(WebCoreTestSupport ${WebCoreTestSupport_LIBRARIES})
 set_target_properties(WebCoreTestSupport PROPERTIES FOLDER "WebCore")
 
 if (WebCoreTestSupport_OUTPUT_NAME)
     set_target_properties(WebCoreTestSupport PROPERTIES OUTPUT_NAME ${WebCoreTestSupport_OUTPUT_NAME})
 endif ()
 
-add_dependencies(WebCore _javascript_Core)
-add_dependencies(WebCoreTestSupport WebCore)
-
 if (WTF_USE_LEVELDB)
     add_library(leveldb STATIC ${LEVELDB_SOURCES})
     target_link_libraries(leveldb ${CMAKE_THREAD_LIBS_INIT})

Modified: trunk/Source/WebKit/CMakeLists.txt (152773 => 152774)


--- trunk/Source/WebKit/CMakeLists.txt	2013-07-17 07:27:41 UTC (rev 152773)
+++ trunk/Source/WebKit/CMakeLists.txt	2013-07-17 08:37:03 UTC (rev 152774)
@@ -78,6 +78,8 @@
 endif ()
 
 set(WebKit_LIBRARIES
+    _javascript_Core
+    WTF
     WebCore
 )
 

Modified: trunk/Source/WebKit/ChangeLog (152773 => 152774)


--- trunk/Source/WebKit/ChangeLog	2013-07-17 07:27:41 UTC (rev 152773)
+++ trunk/Source/WebKit/ChangeLog	2013-07-17 08:37:03 UTC (rev 152774)
@@ -1,3 +1,15 @@
+2013-07-16  Balazs Kelemen  <[email protected]>
+
+        [CMake] Undefined references should be detected at build time
+        https://bugs.webkit.org/show_bug.cgi?id=110236
+
+        Reviewed by Christophe Dumez.
+
+        Add library dependencies that were not defined explicitly before.
+
+        * CMakeLists.txt:
+        * PlatformEfl.cmake:
+
 2013-07-11  Timothy Hatcher  <[email protected]>
 
         Revert r152267 and soft link WebInspectorUI.framework again.

Modified: trunk/Source/WebKit/PlatformEfl.cmake (152773 => 152774)


--- trunk/Source/WebKit/PlatformEfl.cmake	2013-07-17 07:27:41 UTC (rev 152773)
+++ trunk/Source/WebKit/PlatformEfl.cmake	2013-07-17 08:37:03 UTC (rev 152774)
@@ -154,6 +154,8 @@
 list(APPEND WebKit_LIBRARIES
     ${CAIRO_LIBRARIES}
     ${ECORE_LIBRARIES}
+    ${EDJE_LIBRARIES}
+    ${EINA_LIBRARIES}
     ${ECORE_EVAS_LIBRARIES}
     ${ECORE_INPUT_LIBRARIES}
     ${EFREET_LIBRARIES}
@@ -172,6 +174,12 @@
     ${LIBSOUP_LIBRARIES}
 )
 
+if (ENABLE_ECORE_X)
+    list(APPEND WebKit_LIBRARIES
+        ${ECORE_X_LIBRARIES}
+    )
+endif ()
+
 if (SHARED_CORE)
     set(LIBS_PRIVATE "-l${WTF_OUTPUT_NAME} -l${_javascript_Core_OUTPUT_NAME} -l${WebCore_OUTPUT_NAME}")
 else ()

Modified: trunk/Source/WebKit2/CMakeLists.txt (152773 => 152774)


--- trunk/Source/WebKit2/CMakeLists.txt	2013-07-17 07:27:41 UTC (rev 152773)
+++ trunk/Source/WebKit2/CMakeLists.txt	2013-07-17 08:37:03 UTC (rev 152774)
@@ -603,10 +603,17 @@
 )
 
 set(WebKit2_LIBRARIES
+    _javascript_Core
     WTF
     WebCore
 )
 
+# librt is needed for shm_open on Linux.
+find_library(LIBRT_LIBRARIES NAMES rt)
+if (LIBRT_LIBRARIES)
+    list(APPEND WebKit2_LIBRARIES ${LIBRT_LIBRARIES})
+endif ()
+
 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
 
 # Create _javascript_ C++ code given an IDL input

Modified: trunk/Source/WebKit2/ChangeLog (152773 => 152774)


--- trunk/Source/WebKit2/ChangeLog	2013-07-17 07:27:41 UTC (rev 152773)
+++ trunk/Source/WebKit2/ChangeLog	2013-07-17 08:37:03 UTC (rev 152774)
@@ -1,3 +1,15 @@
+2013-07-16  Balazs Kelemen  <[email protected]>
+
+        [CMake] Undefined references should be detected at build time
+        https://bugs.webkit.org/show_bug.cgi?id=110236
+
+        Reviewed by Christophe Dumez.
+
+        Add library dependencies that were not defined explicitly before.
+
+        * CMakeLists.txt:
+        * PlatformEfl.cmake:
+
 2013-07-17  Dong-Gwan Kim  <[email protected]>
 
         [EFL][WK2] EWK2WindowFeaturesTest should be defined by inheriting from EWK2UnitTestBase.

Modified: trunk/Source/WebKit2/PlatformEfl.cmake (152773 => 152774)


--- trunk/Source/WebKit2/PlatformEfl.cmake	2013-07-17 07:27:41 UTC (rev 152773)
+++ trunk/Source/WebKit2/PlatformEfl.cmake	2013-07-17 08:37:03 UTC (rev 152774)
@@ -228,6 +228,7 @@
     ${CAIRO_LIBRARIES}
     ${ECORE_LIBRARIES}
     ${ECORE_EVAS_LIBRARIES}
+    ${ECORE_IMF_EVAS_LIBRARIES}
     ${EDJE_LIBRARIES}
     ${EFREET_LIBRARIES}
     ${EINA_LIBRARIES}
@@ -283,7 +284,11 @@
 if (ENABLE_ECORE_X)
     list(APPEND WebProcess_LIBRARIES
         ${ECORE_X_LIBRARIES}
-        ${X11_Xext_LIB})
+        ${X11_Xext_LIB}
+    )
+    list(APPEND WebKit2_LIBRARIES
+        ${ECORE_X_LIBRARIES}
+    )
 endif ()
 
 add_custom_target(forwarding-headerEfl
@@ -357,6 +362,12 @@
         WebKit2
     )
 
+    if (ENABLE_ECORE_X)
+        list(APPEND PluginProcess_LIBRARIES
+            ${ECORE_X_LIBRARIES}
+        )
+    endif ()
+
     add_executable(PluginProcess ${PluginProcess_SOURCES})
     target_link_libraries(PluginProcess ${PluginProcess_LIBRARIES})
     install(TARGETS PluginProcess DESTINATION "${EXEC_INSTALL_DIR}")

Modified: trunk/Source/cmake/OptionsCommon.cmake (152773 => 152774)


--- trunk/Source/cmake/OptionsCommon.cmake	2013-07-17 07:27:41 UTC (rev 152773)
+++ trunk/Source/cmake/OptionsCommon.cmake	2013-07-17 08:37:03 UTC (rev 152774)
@@ -31,6 +31,10 @@
     set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "-Wl,--no-keep-memory ${CMAKE_SHARED_LINKER_FLAGS_DEBUG}")
 endif ()
 
+if (UNIX AND NOT APPLE)
+    set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_SHARED_LINKER_FLAGS}")
+endif ()
+
 set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)")
 
 set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}" CACHE PATH "Where to install libraries (lib${LIB_SUFFIX})")

Modified: trunk/Tools/ChangeLog (152773 => 152774)


--- trunk/Tools/ChangeLog	2013-07-17 07:27:41 UTC (rev 152773)
+++ trunk/Tools/ChangeLog	2013-07-17 08:37:03 UTC (rev 152774)
@@ -1,3 +1,16 @@
+2013-07-16  Balazs Kelemen  <[email protected]>
+
+        [CMake] Undefined references should be detected at build time
+        https://bugs.webkit.org/show_bug.cgi?id=110236
+
+        Reviewed by Christophe Dumez.
+
+        Add library dependencies that were not defined explicitly before.
+
+        * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt:
+        * TestWebKitAPI/CMakeLists.txt:
+        * WebKitTestRunner/CMakeLists.txt:
+
 2013-07-16  Kwang Yul Seo  <[email protected]>
 
         check-webkit-style: "using namespace foo;" should be flagged as an error only in headers

Modified: trunk/Tools/DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt (152773 => 152774)


--- trunk/Tools/DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt	2013-07-17 07:27:41 UTC (rev 152773)
+++ trunk/Tools/DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt	2013-07-17 08:37:03 UTC (rev 152774)
@@ -37,4 +37,9 @@
 
 include_directories(${WebKitTestNetscapePlugin_INCLUDE_DIRECTORIES})
 
+set(WebKitTestNetscapePlugin_LIBRARIES
+    ${X11_LIBRARIES}
+)
+
 add_library(TestNetscapePlugin SHARED ${WebKitTestNetscapePlugin_SOURCES})
+target_link_libraries(TestNetscapePlugin ${WebKitTestNetscapePlugin_LIBRARIES})

Modified: trunk/Tools/TestWebKitAPI/CMakeLists.txt (152773 => 152774)


--- trunk/Tools/TestWebKitAPI/CMakeLists.txt	2013-07-17 07:27:41 UTC (rev 152773)
+++ trunk/Tools/TestWebKitAPI/CMakeLists.txt	2013-07-17 08:37:03 UTC (rev 152774)
@@ -55,9 +55,14 @@
     ${TESTWEBKITAPI_DIR}/Tests/WebKit2/WillSendSubmitEvent_Bundle.cpp
 )
 
-target_link_libraries(TestWebKitAPIInjectedBundle WTF)
-add_dependencies(TestWebKitAPIInjectedBundle WebKit2 ${ForwardingHeadersForTestWebKitAPI_NAME} ${ForwardingNetworkHeadersForTestWebKitAPI_NAME})
+set(TestWebKitAPI_LIBRARIES
+    WTF
+    WebKit2
+)
 
+target_link_libraries(TestWebKitAPIInjectedBundle ${TestWebKitAPI_LIBRARIES})
+add_dependencies(TestWebKitAPIInjectedBundle ${ForwardingHeadersForTestWebKitAPI_NAME} ${ForwardingNetworkHeadersForTestWebKitAPI_NAME})
+
 get_property(TestWebKitAPIInjectedBundle_PATH TARGET TestWebKitAPIInjectedBundle PROPERTY LOCATION)
 
 add_definitions(-DGTEST_LINKED_AS_SHARED_LIBRARY=1

Modified: trunk/Tools/WebKitTestRunner/CMakeLists.txt (152773 => 152774)


--- trunk/Tools/WebKitTestRunner/CMakeLists.txt	2013-07-17 07:27:41 UTC (rev 152773)
+++ trunk/Tools/WebKitTestRunner/CMakeLists.txt	2013-07-17 08:37:03 UTC (rev 152774)
@@ -79,6 +79,16 @@
     "${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings/TextInputController.idl"
 )
 
+set(WebKitTestRunnerInjectedBundle_LIBRARIES
+    ${WebKitTestRunner_LIBRARIES}
+    ${ATK_LIBRARIES}
+    ${ECORE_LIBRARIES}
+    ${ECORE_FILE_LIBRARIES}
+    ${FONTCONFIG_LIBRARIES}
+    ${GLIB_LIBRARIES}
+    ${GLIB_GOBJECT_LIBRARIES}
+)
+
 GENERATE_BINDINGS(WebKitTestRunnerInjectedBundle_SOURCES
     "${WebKitTestRunnerInjectedBundle_IDL_FILES}"
     "${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings"
@@ -92,7 +102,7 @@
 include_directories(${WebKitTestRunner_INCLUDE_DIRECTORIES})
 
 add_library(TestRunnerInjectedBundle SHARED ${WebKitTestRunnerInjectedBundle_SOURCES})
-target_link_libraries(TestRunnerInjectedBundle ${WebKitTestRunner_LIBRARIES})
+target_link_libraries(TestRunnerInjectedBundle ${WebKitTestRunnerInjectedBundle_LIBRARIES})
 
 add_executable(WebKitTestRunner ${WebKitTestRunner_SOURCES})
 target_link_libraries(WebKitTestRunner ${WebKitTestRunner_LIBRARIES})
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to