[cmake] Moved PRE/POST_BUILD_COMMAND to WEBKIT_FRAMEWORK.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Mar 2016 22:45:46 +0000 (22:45 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Mar 2016 22:45:46 +0000 (22:45 +0000)
https://bugs.webkit.org/show_bug.cgi?id=154651

Patch by Konstantin Tokarev <annulen@yandex.ru> on 2016-03-02
Reviewed by Alex Christensen.

.:

* Source/cmake/WebKitMacros.cmake: Used phony target instead of
CMake's PRE_BUILD COMMAND feature because the latter actually
generates pre-link target instead of pre-build.

Source/JavaScriptCore:

* CMakeLists.txt: Moved shared code to WEBKIT_FRAMEWORK macro.

Source/WebCore:

No new tests needed.

* CMakeLists.txt: Moved shared code to WEBKIT_FRAMEWORK macro.

Source/WTF:

* CMakeLists.txt: Moved shared code to WEBKIT_FRAMEWORK macro.

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

ChangeLog
Source/JavaScriptCore/CMakeLists.txt
Source/JavaScriptCore/ChangeLog
Source/WTF/ChangeLog
Source/WTF/wtf/CMakeLists.txt
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/cmake/WebKitMacros.cmake

index 373b4d1..b567338 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2016-03-02  Konstantin Tokarev  <annulen@yandex.ru>
+
+        [cmake] Moved PRE/POST_BUILD_COMMAND to WEBKIT_FRAMEWORK.
+        https://bugs.webkit.org/show_bug.cgi?id=154651
+
+        Reviewed by Alex Christensen.
+
+        * Source/cmake/WebKitMacros.cmake: Used phony target instead of
+        CMake's PRE_BUILD COMMAND feature because the latter actually
+        generates pre-link target instead of pre-build.
+
 2016-03-01  Alex Christensen  <achristensen@webkit.org>
 
         Reduce size of internal windows build output
index 3c86aa7..8a5740c 100644 (file)
@@ -1312,14 +1312,6 @@ add_subdirectory(shell)
 WEBKIT_WRAP_SOURCELIST(${JavaScriptCore_SOURCES})
 WEBKIT_FRAMEWORK(JavaScriptCore)
 
-if (JavaScriptCore_PRE_BUILD_COMMAND)
-    add_custom_command(TARGET JavaScriptCore PRE_BUILD COMMAND ${JavaScriptCore_PRE_BUILD_COMMAND} VERBATIM)
-endif ()
-
-if (JavaScriptCore_POST_BUILD_COMMAND)
-    add_custom_command(TARGET JavaScriptCore POST_BUILD COMMAND ${JavaScriptCore_POST_BUILD_COMMAND} VERBATIM)
-endif ()
-
 if (${JavaScriptCore_LIBRARY_TYPE} STREQUAL "SHARED")
     POPULATE_LIBRARY_VERSION(JAVASCRIPTCORE)
     set_target_properties(JavaScriptCore PROPERTIES VERSION ${JAVASCRIPTCORE_VERSION} SOVERSION ${JAVASCRIPTCORE_VERSION_MAJOR})
index 5732949..1dbd1c6 100644 (file)
@@ -1,3 +1,12 @@
+2016-03-02  Konstantin Tokarev  <annulen@yandex.ru>
+
+        [cmake] Moved PRE/POST_BUILD_COMMAND to WEBKIT_FRAMEWORK.
+        https://bugs.webkit.org/show_bug.cgi?id=154651
+
+        Reviewed by Alex Christensen.
+
+        * CMakeLists.txt: Moved shared code to WEBKIT_FRAMEWORK macro.
+
 2016-03-02  Saam barati  <sbarati@apple.com>
 
         [[SetPrototypeOf]] should be a fully virtual method in ClassInfo::methodTable
index 7fed4ba..a267a1b 100644 (file)
@@ -1,3 +1,12 @@
+2016-03-02  Konstantin Tokarev  <annulen@yandex.ru>
+
+        [cmake] Moved PRE/POST_BUILD_COMMAND to WEBKIT_FRAMEWORK.
+        https://bugs.webkit.org/show_bug.cgi?id=154651
+
+        Reviewed by Alex Christensen.
+
+        * CMakeLists.txt: Moved shared code to WEBKIT_FRAMEWORK macro.
+
 2016-03-01  Commit Queue  <commit-queue@webkit.org>
 
         Unreviewed, rolling out r197226 and r197256.
index 25de714..433698d 100644 (file)
@@ -289,7 +289,3 @@ if (MSVC)
     set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SUBSYSTEM:WINDOWS")
     set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS")
 endif ()
-
-if (WTF_PRE_BUILD_COMMAND)
-    add_custom_command(TARGET WTF PRE_BUILD COMMAND ${WTF_PRE_BUILD_COMMAND} VERBATIM)
-endif ()
index 05c76d9..c029dd7 100644 (file)
@@ -3781,15 +3781,6 @@ if (CMAKE_COMPILER_IS_GNUCXX AND "${LOWERCASE_CMAKE_HOST_SYSTEM_PROCESSOR}" MATC
     ADD_TARGET_PROPERTIES(WebCore COMPILE_FLAGS "-fno-tree-sra")
 endif ()
 
-if (WebCore_PRE_BUILD_COMMAND)
-    add_custom_target(WebCorePreBuild COMMAND ${WebCore_PRE_BUILD_COMMAND} VERBATIM)
-    add_dependencies(WebCore WebCorePreBuild)
-endif ()
-
-if (WebCore_POST_BUILD_COMMAND)
-    add_custom_command(TARGET WebCore POST_BUILD COMMAND ${WebCore_POST_BUILD_COMMAND} VERBATIM)
-endif ()
-
 if (MSVC)
     ADD_PRECOMPILED_HEADER("WebCoreTestSupportPrefix.h" "testing/js/WebCoreTestSupportPrefix.cpp" WebCoreTestSupport_SOURCES)
 endif ()
index 2e0349a..24f26d4 100644 (file)
@@ -1,3 +1,14 @@
+2016-03-02  Konstantin Tokarev  <annulen@yandex.ru>
+
+        [cmake] Moved PRE/POST_BUILD_COMMAND to WEBKIT_FRAMEWORK.
+        https://bugs.webkit.org/show_bug.cgi?id=154651
+
+        Reviewed by Alex Christensen.
+
+        No new tests needed.
+
+        * CMakeLists.txt: Moved shared code to WEBKIT_FRAMEWORK macro.
+
 2016-03-02  Dave Hyatt  <hyatt@apple.com>
 
         Add support for the "first" value of the hanging-punctuation property.
index 852a1c0..7911c0f 100644 (file)
@@ -258,6 +258,15 @@ macro(WEBKIT_FRAMEWORK _target)
         set_target_properties(${_target} PROPERTIES OUTPUT_NAME ${${_target}_OUTPUT_NAME})
     endif ()
 
+    if (${_target}_PRE_BUILD_COMMAND)
+        add_custom_target(_${_target}_PreBuild COMMAND ${${_target}_PRE_BUILD_COMMAND} VERBATIM)
+        add_dependencies(${_target} _${_target}_PreBuild)
+    endif ()
+
+    if (${_target}_POST_BUILD_COMMAND)
+        add_custom_command(TARGET ${_target} POST_BUILD COMMAND ${${_target}_POST_BUILD_COMMAND} VERBATIM)
+    endif ()
+
     if (APPLE AND NOT PORT STREQUAL "GTK")
         set_target_properties(${_target} PROPERTIES FRAMEWORK TRUE)
         install(TARGETS ${_target} FRAMEWORK DESTINATION ${LIB_INSTALL_DIR})