[Win CMake] Fix incremental build after r188673
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 27 Aug 2015 21:31:43 +0000 (21:31 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 27 Aug 2015 21:31:43 +0000 (21:31 +0000)
https://bugs.webkit.org/show_bug.cgi?id=148539

Reviewed by Brent Fulgham.

Source/JavaScriptCore:

* PlatformWin.cmake:
Use xcopy as a build step instead of file(COPY ...) to copy updated headers.

Source/WebCore:

* CMakeLists.txt:
* PlatformWin.cmake:
Use xcopy as a build step instead of file(COPY ...) to copy updated headers.

Tools:

* TestWebKitAPI/PlatformWin.cmake:
Copy forwarding headers from WebCore before building in case that was not yet done.
It used to be done when running CMake, but now it's a build step.

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

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/PlatformWin.cmake
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/PlatformWin.cmake
Tools/ChangeLog
Tools/TestWebKitAPI/PlatformWin.cmake

index 945cbc1..3a81053 100644 (file)
@@ -1,3 +1,13 @@
+2015-08-27  Alex Christensen  <achristensen@webkit.org>
+
+        [Win CMake] Fix incremental build after r188673
+        https://bugs.webkit.org/show_bug.cgi?id=148539
+
+        Reviewed by Brent Fulgham.
+
+        * PlatformWin.cmake:
+        Use xcopy as a build step instead of file(COPY ...) to copy updated headers.
+
 2015-08-27  Jon Davis  <jond@apple.com>
 
         Include ES6 Generators and Proxy object status to feature status page.
index 5e16562..22f0f08 100644 (file)
@@ -35,15 +35,12 @@ file(COPY
     ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
 )
 
+file(MAKE_DIRECTORY ${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore)
+set(JavaScriptCore_POST_BUILD_COMMAND "${CMAKE_BINARY_DIR}/DerivedSources/JavaScriptCore/postBuild.cmd")
+file(WRITE "${JavaScriptCore_POST_BUILD_COMMAND}" "@xcopy /y /d /f \"${DERIVED_SOURCES_DIR}/JavaScriptCore/*.h\" \"${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore\" >nul 2>nul\n")
+file(APPEND "${JavaScriptCore_POST_BUILD_COMMAND}" "@xcopy /y /d /f \"${DERIVED_SOURCES_DIR}/JavaScriptCore/inspector/*.h\" \"${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore\" >nul 2>nul\n")
 foreach (_directory ${JavaScriptCore_FORWARDING_HEADERS_DIRECTORIES})
-    file(GLOB _files "${JAVASCRIPTCORE_DIR}/${_directory}/*.h")
-    foreach (_file ${_files})
-        file(COPY ${_file} DESTINATION "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore")
-    endforeach ()
+    file(APPEND "${JavaScriptCore_POST_BUILD_COMMAND}" "@xcopy /y /d /f \"${JAVASCRIPTCORE_DIR}/${_directory}/*.h\" \"${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore\" >nul 2>nul\n")
 endforeach ()
 
-set(JavaScriptCore_POST_BUILD_COMMAND "${CMAKE_BINARY_DIR}/DerivedSources/JavaScriptCore/postBuild.cmd")
-file(WRITE "${JavaScriptCore_POST_BUILD_COMMAND}" "@xcopy /y /d /f \"${DERIVED_SOURCES_DIR}/JavaScriptCore/*.h\" \"${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore\" >nul 2>nul\n@xcopy /y /d /f \"${DERIVED_SOURCES_DIR}/JavaScriptCore/inspector/*.h\" \"${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore\" >nul 2>nul\n")
-file(MAKE_DIRECTORY ${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore)
-
 set(JavaScriptCore_OUTPUT_NAME JavaScriptCore${DEBUG_SUFFIX})
index 04a2f14..589a13b 100644 (file)
@@ -3615,6 +3615,11 @@ 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 ()
index 570e6dc..c5f0756 100644 (file)
@@ -1,3 +1,14 @@
+2015-08-27  Alex Christensen  <achristensen@webkit.org>
+
+        [Win CMake] Fix incremental build after r188673
+        https://bugs.webkit.org/show_bug.cgi?id=148539
+
+        Reviewed by Brent Fulgham.
+
+        * CMakeLists.txt:
+        * PlatformWin.cmake:
+        Use xcopy as a build step instead of file(COPY ...) to copy updated headers.
+
 2015-08-27  Timothy Horton  <timothy_horton@apple.com>
 
         Factor out Lookup invocation
index e02d2db..6456168 100644 (file)
@@ -271,21 +271,14 @@ endif ()
 
 file(MAKE_DIRECTORY ${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebCore)
 
+set(WebCore_PRE_BUILD_COMMAND "${CMAKE_BINARY_DIR}/DerivedSources/WebCore/preBuild.cmd")
+file(WRITE "${WebCore_PRE_BUILD_COMMAND}" "@xcopy /y /s /d /f \"${WEBCORE_DIR}/ForwardingHeaders/*.h\" \"${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebCore\" >nul 2>nul\n")
 foreach (_directory ${WebCore_FORWARDING_HEADERS_DIRECTORIES})
-    file(GLOB _files "${WEBCORE_DIR}/${_directory}/*.h")
-    foreach (_file ${_files})
-        file(COPY ${_file} DESTINATION "${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebCore")
-    endforeach ()
+    file(APPEND "${WebCore_PRE_BUILD_COMMAND}" "@xcopy /y /d /f \"${WEBCORE_DIR}/${_directory}/*.h\" \"${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebCore\" >nul 2>nul\n")
 endforeach ()
 
-# These forwarding headers need to keep their directory structure.
 set(WebCore_POST_BUILD_COMMAND "${CMAKE_BINARY_DIR}/DerivedSources/WebCore/postBuild.cmd")
-file(WRITE "${WebCore_POST_BUILD_COMMAND}" "@xcopy /y /s /d /f \"${WEBCORE_DIR}/ForwardingHeaders/*.h\" \"${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebCore\" >nul 2>nul\n@xcopy /y /s /d /f \"${DERIVED_SOURCES_WEBCORE_DIR}/*.h\" \"${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebCore\" >nul 2>nul\n")
-
-file(GLOB_RECURSE _files "${WEBCORE_DIR}/ForwardingHeaders/*.h")
-foreach (_file ${_files})
-    file(COPY ${_file} DESTINATION "${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebCore")
-endforeach ()
+file(WRITE "${WebCore_POST_BUILD_COMMAND}" "@xcopy /y /s /d /f \"${DERIVED_SOURCES_WEBCORE_DIR}/*.h\" \"${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebCore\" >nul 2>nul\n")
 
 set(WebCore_OUTPUT_NAME
     WebCore${DEBUG_SUFFIX}
index 2fc9735..2ab3081 100644 (file)
@@ -1,3 +1,14 @@
+2015-08-27  Alex Christensen  <achristensen@webkit.org>
+
+        [Win CMake] Fix incremental build after r188673
+        https://bugs.webkit.org/show_bug.cgi?id=148539
+
+        Reviewed by Brent Fulgham.
+
+        * TestWebKitAPI/PlatformWin.cmake:
+        Copy forwarding headers from WebCore before building in case that was not yet done.
+        It used to be done when running CMake, but now it's a build step.
+
 2015-08-27  Nan Wang  <n_wang@apple.com>
 
         AX: Fix accessibility/select-element-at-index.html test
index 4c85a42..6bb5eae 100644 (file)
@@ -2,6 +2,11 @@ set(TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
 set(TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY_WTF "${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY}")
 add_definitions(-DUSE_CONSOLE_ENTRY_POINT)
 
+add_custom_target(forwarding-headersWinForTestWebKitAPI
+    COMMAND ${CMAKE_BINARY_DIR}/DerivedSources/WebCore/preBuild.cmd VERBATIM
+)
+set(ForwardingHeadersForTestWebKitAPI_NAME forwarding-headersWinForTestWebKitAPI)
+
 if (${WTF_PLATFORM_WIN_CAIRO})
     add_definitions(-DWIN_CAIRO)
 endif ()