[CMake] Split JSC header copying into public and private targets
authordon.olmstead@sony.com <don.olmstead@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Mar 2018 13:28:35 +0000 (13:28 +0000)
committerdon.olmstead@sony.com <don.olmstead@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Mar 2018 13:28:35 +0000 (13:28 +0000)
https://bugs.webkit.org/show_bug.cgi?id=183251

Reviewed by Konstantin Tokarev.

.:

* Source/cmake/WebKitMacros.cmake:

Source/JavaScriptCore:

* CMakeLists.txt:

Source/ThirdParty:

* gtest/CMakeLists.txt:

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

ChangeLog
Source/JavaScriptCore/CMakeLists.txt
Source/JavaScriptCore/ChangeLog
Source/ThirdParty/ChangeLog
Source/ThirdParty/gtest/CMakeLists.txt
Source/cmake/WebKitMacros.cmake

index 7f4f975..2d5142c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2018-03-05  Don Olmstead  <don.olmstead@sony.com>
+
+        [CMake] Split JSC header copying into public and private targets
+        https://bugs.webkit.org/show_bug.cgi?id=183251
+
+        Reviewed by Konstantin Tokarev.
+
+        * Source/cmake/WebKitMacros.cmake:
+
 2018-03-02  Don Olmstead  <don.olmstead@sony.com>
 
         Add clang-format configuration
index 71bdfbc..eda5eeb 100644 (file)
@@ -253,6 +253,7 @@ add_executable(LLIntOffsetsExtractor
     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntDesiredOffsets.h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/Bytecodes.h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/BytecodeStructs.h
 )
 target_link_libraries(LLIntOffsetsExtractor WTF)
+add_dependencies(LLIntOffsetsExtractor JavaScriptCoreForwardingHeaders)
 
 # The build system will execute asm.rb every time LLIntOffsetsExtractor's mtime is newer than
 # LLIntAssembly.h's mtime. The problem we have here is: asm.rb has some built-in optimization
@@ -1173,7 +1174,13 @@ WEBKIT_FRAMEWORK_DECLARE(JavaScriptCore)
 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
 
 WEBKIT_MAKE_FORWARDING_HEADERS(JavaScriptCore
-    FILES ${JavaScriptCore_PUBLIC_FRAMEWORK_HEADERS} ${JavaScriptCore_PRIVATE_FRAMEWORK_HEADERS}
+    FILES ${JavaScriptCore_PUBLIC_FRAMEWORK_HEADERS}
+    FLATTENED
+)
+
+WEBKIT_MAKE_FORWARDING_HEADERS(JavaScriptCore
+    TARGET_NAME JavaScriptCorePrivateForwardingHeaders
+    FILES ${JavaScriptCore_PRIVATE_FRAMEWORK_HEADERS}
     DERIVED_SOURCE_DIRECTORIES ${DERIVED_SOURCES_DIR}/JavaScriptCore ${DERIVED_SOURCES_DIR}/JavaScriptCore/inspector
     FLATTENED
 )
index c168904..99dd7d1 100644 (file)
@@ -1,3 +1,12 @@
+2018-03-05  Don Olmstead  <don.olmstead@sony.com>
+
+        [CMake] Split JSC header copying into public and private targets
+        https://bugs.webkit.org/show_bug.cgi?id=183251
+
+        Reviewed by Konstantin Tokarev.
+
+        * CMakeLists.txt:
+
 2018-03-04  Yusuke Suzuki  <utatane.tea@gmail.com>
 
         [WTF] Move currentCPUTime and sleep(Seconds) to CPUTime.h and Seconds.h respectively
index 4c0780f..153819d 100644 (file)
@@ -1,3 +1,12 @@
+2018-03-05  Don Olmstead  <don.olmstead@sony.com>
+
+        [CMake] Split JSC header copying into public and private targets
+        https://bugs.webkit.org/show_bug.cgi?id=183251
+
+        Reviewed by Konstantin Tokarev.
+
+        * gtest/CMakeLists.txt:
+
 2018-02-06  Don Olmstead  <don.olmstead@sony.com>
 
         Remove WebCore/ForwardingHeaders directory
index d297ebf..99f7fb0 100755 (executable)
@@ -46,7 +46,7 @@ endif ()
 target_link_libraries(gtest
     WTF
 )
-add_dependencies(gtest JavaScriptCoreForwardingHeaders)
+add_dependencies(gtest JavaScriptCorePrivateForwardingHeaders)
 
 if (CMAKE_USE_PTHREADS_INIT)
     target_link_libraries(gtest ${CMAKE_THREAD_LIBS_INIT})
index a1e7e8f..36e5a02 100644 (file)
@@ -217,7 +217,7 @@ endmacro()
 
 function(WEBKIT_MAKE_FORWARDING_HEADERS framework)
     set(options FLATTENED)
-    set(oneValueArgs DESTINATION)
+    set(oneValueArgs DESTINATION TARGET_NAME)
     set(multiValueArgs DIRECTORIES EXTRA_DIRECTORIES DERIVED_SOURCE_DIRECTORIES FILES)
     cmake_parse_arguments(opt "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
     set(headers ${opt_FILES})
@@ -263,8 +263,13 @@ function(WEBKIT_MAKE_FORWARDING_HEADERS framework)
             list(APPEND fwd_headers ${fwd_header})
         endforeach ()
     endforeach ()
-    add_custom_target(${framework}ForwardingHeaders DEPENDS ${fwd_headers})
-    add_dependencies(${framework} ${framework}ForwardingHeaders)
+    if (opt_TARGET_NAME)
+        set(target_name ${opt_TARGET_NAME})
+    else ()
+        set(target_name ${framework}ForwardingHeaders)
+    endif ()
+    add_custom_target(${target_name} DEPENDS ${fwd_headers})
+    add_dependencies(${framework} ${target_name})
     if (opt_DERIVED_SOURCE_DIRECTORIES)
         set(script ${CMAKE_CURRENT_BINARY_DIR}/makeForwardingHeaders.cmake)
         set(content "")