Fix tests on Windows after switching to CMake.
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Sep 2015 18:00:16 +0000 (18:00 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Sep 2015 18:00:16 +0000 (18:00 +0000)
https://bugs.webkit.org/show_bug.cgi?id=149339

Reviewed by Brent Fulgham.

.:

* Source/PlatformWin.cmake: Added to copy WebInspectorUI.

Source/JavaScriptCore:

* shell/PlatformWin.cmake:
Build testapi and testRegExp (which doesn't seem to be used any more).

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

ChangeLog
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/shell/PlatformWin.cmake
Source/PlatformWin.cmake [new file with mode: 0644]

index cb73933..6d825e4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2015-09-18  Alex Christensen  <achristensen@webkit.org>
+
+        Fix tests on Windows after switching to CMake.
+        https://bugs.webkit.org/show_bug.cgi?id=149339
+
+        Reviewed by Brent Fulgham.
+
+        * Source/PlatformWin.cmake: Added to copy WebInspectorUI.
+
 2015-09-17  Alex Christensen  <achristensen@webkit.org>
 
         Fix Windows EWS build after r189934.
index 7146236..e6fa7f6 100644 (file)
@@ -1,3 +1,13 @@
+2015-09-18  Alex Christensen  <achristensen@webkit.org>
+
+        Fix tests on Windows after switching to CMake.
+        https://bugs.webkit.org/show_bug.cgi?id=149339
+
+        Reviewed by Brent Fulgham.
+
+        * shell/PlatformWin.cmake:
+        Build testapi and testRegExp (which doesn't seem to be used any more).
+
 2015-09-17  Brian Burg  <bburg@apple.com>
 
         ASSERT(!m_frontendRouter->hasLocalFrontend()) when running Web Inspector tests
index 0b5cc00..ca50e98 100644 (file)
@@ -18,3 +18,36 @@ set(JSC_LIBRARIES shlwapi)
 add_definitions(-DUSE_CONSOLE_ENTRY_POINT)
 
 set(JSC_OUTPUT_NAME "jsc${DEBUG_SUFFIX}")
+
+add_library(testRegExpLib SHARED ../testRegExp.cpp)
+set_target_properties(testRegExpLib PROPERTIES FOLDER "JavaScriptCore")
+set_target_properties(testRegExpLib PROPERTIES OUTPUT_NAME "testRegExp${DEBUG_SUFFIX}")
+add_executable(testRegExp ${JSC_SOURCES})
+set_target_properties(testRegExp PROPERTIES OUTPUT_NAME "testRegExp${DEBUG_SUFFIX}")
+target_link_libraries(testRegExp shlwapi)
+add_dependencies(testRegExp testRegExpLib)
+target_link_libraries(testRegExpLib JavaScriptCore)
+
+add_library(testapiLib SHARED
+    ../API/tests/CompareAndSwapTest.cpp
+    ../API/tests/CustomGlobalObjectClassTest.c
+    ../API/tests/ExecutionTimeLimitTest.cpp
+    ../API/tests/GlobalContextWithFinalizerTest.cpp
+    ../API/tests/PingPongStackOverflowTest.cpp
+    ../API/tests/testapi.c
+)
+set_source_files_properties(../API/tests/CustomGlobalObjectClassTest.c PROPERTIES COMPILE_FLAGS "/TP /MT")
+set_source_files_properties(../API/tests/testapi.c PROPERTIES COMPILE_FLAGS "/TP /MT")
+set_target_properties(testapiLib PROPERTIES FOLDER "JavaScriptCore")
+set_target_properties(testapiLib PROPERTIES OUTPUT_NAME "testapi${DEBUG_SUFFIX}")
+add_executable(testapi ${JSC_SOURCES})
+set_target_properties(testapi PROPERTIES OUTPUT_NAME "testapi${DEBUG_SUFFIX}")
+target_link_libraries(testapi shlwapi)
+add_dependencies(testapi testapiLib)
+target_link_libraries(testapiLib JavaScriptCore)
+
+file(COPY
+    "${JAVASCRIPTCORE_DIR}/API/tests/testapi.js"
+    DESTINATION
+    ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
+)
diff --git a/Source/PlatformWin.cmake b/Source/PlatformWin.cmake
new file mode 100644 (file)
index 0000000..72d7e29
--- /dev/null
@@ -0,0 +1,12 @@
+set(WEBINSPECTORUI_DIR "${CMAKE_SOURCE_DIR}/Source/WebInspectorUI")
+set(WEB_INSPECTOR_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/WebInspectorUI)
+
+add_custom_target(
+    web-inspector-resources ALL
+    COMMAND ${CMAKE_COMMAND} -E copy_directory ${WEBINSPECTORUI_DIR}/UserInterface ${WEB_INSPECTOR_DIR}
+    COMMAND ${CMAKE_COMMAND} -E copy ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorBackendCommands.js ${WEB_INSPECTOR_DIR}/Protocol
+    COMMAND ${CMAKE_COMMAND} -E copy ${WEBINSPECTORUI_DIR}/Localizations/en.lproj/localizedStrings.js ${WEB_INSPECTOR_DIR}
+    COMMAND ${CMAKE_COMMAND} -E copy ${WEBKIT2_DIR}/UIProcess/InspectorServer/front-end/inspectorPageIndex.html ${WEB_INSPECTOR_DIR}
+    DEPENDS JavaScriptCore WebCore
+    WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+)