[CMake] Include most CMake modules from WebKitCommon.cmake
authormcatanzaro@igalia.com <mcatanzaro@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Jul 2017 22:50:40 +0000 (22:50 +0000)
committermcatanzaro@igalia.com <mcatanzaro@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Jul 2017 22:50:40 +0000 (22:50 +0000)
https://bugs.webkit.org/show_bug.cgi?id=174546

Reviewed by Konstantin Tokarev.

.:

* CMakeLists.txt:
* Source/cmake/OptionsCommon.cmake:
* Source/cmake/WebKitCommon.cmake:
* Source/cmake/WebKitMacros.cmake:

Source/WebCore:

* WebCoreMacros.cmake:

Source/WebKit:

* CMakeLists.txt:

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

CMakeLists.txt
ChangeLog
Source/WebCore/ChangeLog
Source/WebCore/WebCoreMacros.cmake
Source/WebKit/CMakeLists.txt
Source/WebKit/ChangeLog
Source/cmake/OptionsCommon.cmake
Source/cmake/WebKitCommon.cmake
Source/cmake/WebKitMacros.cmake

index 48c2d5f..e6e198f 100644 (file)
@@ -150,11 +150,6 @@ if (ENABLE_API_TESTS)
 endif ()
 
 # -----------------------------------------------------------------------------
-# Define packaging
-# -----------------------------------------------------------------------------
-include(WebKitPackaging)
-
-# -----------------------------------------------------------------------------
 # Add module directories
 # -----------------------------------------------------------------------------
 add_subdirectory(Source)
index ff91885..d6dc130 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
 2017-07-17  Michael Catanzaro  <mcatanzaro@igalia.com>
 
+        [CMake] Include most CMake modules from WebKitCommon.cmake
+        https://bugs.webkit.org/show_bug.cgi?id=174546
+
+        Reviewed by Konstantin Tokarev.
+
+        * CMakeLists.txt:
+        * Source/cmake/OptionsCommon.cmake:
+        * Source/cmake/WebKitCommon.cmake:
+        * Source/cmake/WebKitMacros.cmake:
+
+2017-07-17  Michael Catanzaro  <mcatanzaro@igalia.com>
+
         [CMake] Macros in WebKitMacros.cmake should be prefixed with WEBKIT_ namespace
         https://bugs.webkit.org/show_bug.cgi?id=174547
 
index f4ce073..0af2654 100644 (file)
@@ -1,5 +1,14 @@
 2017-07-17  Michael Catanzaro  <mcatanzaro@igalia.com>
 
+        [CMake] Include most CMake modules from WebKitCommon.cmake
+        https://bugs.webkit.org/show_bug.cgi?id=174546
+
+        Reviewed by Konstantin Tokarev.
+
+        * WebCoreMacros.cmake:
+
+2017-07-17  Michael Catanzaro  <mcatanzaro@igalia.com>
+
         [CMake] Macros in WebKitMacros.cmake should be prefixed with WEBKIT_ namespace
         https://bugs.webkit.org/show_bug.cgi?id=174547
 
index 2f7f372..26d6f8a 100644 (file)
@@ -117,6 +117,7 @@ function(GENERATE_BINDINGS target)
     if (arg_SUPPLEMENTAL_DEPFILE)
         list(APPEND args --supplementalDependencyFile ${arg_SUPPLEMENTAL_DEPFILE})
     endif ()
+    ProcessorCount(PROCESSOR_COUNT)
     if (PROCESSOR_COUNT)
         list(APPEND args --numOfJobs ${PROCESSOR_COUNT})
     endif ()
index e845905..d30a0bf 100644 (file)
@@ -1,5 +1,4 @@
-include(CheckCXXSourceCompiles)
-include(CheckFunctionExists)
+include(WebKitCommon)
 
 set_property(DIRECTORY . PROPERTY FOLDER "WebKit2")
 
index 43be3d1..f90410d 100644 (file)
@@ -1,5 +1,14 @@
 2017-07-17  Michael Catanzaro  <mcatanzaro@igalia.com>
 
+        [CMake] Include most CMake modules from WebKitCommon.cmake
+        https://bugs.webkit.org/show_bug.cgi?id=174546
+
+        Reviewed by Konstantin Tokarev.
+
+        * CMakeLists.txt:
+
+2017-07-17  Michael Catanzaro  <mcatanzaro@igalia.com>
+
         [CMake] Macros in WebKitMacros.cmake should be prefixed with WEBKIT_ namespace
         https://bugs.webkit.org/show_bug.cgi?id=174547
 
index 813d0ee..6108b9b 100644 (file)
@@ -127,7 +127,6 @@ if (WTF_CPU_ARM64_CORTEXA53)
     if (NOT WTF_CPU_ARM64)
         message(FATAL_ERROR "WTF_CPU_ARM64_CORTEXA53 set without WTF_CPU_ARM64")
     endif ()
-    include(TestCXXAcceptsFlag)
     CHECK_CXX_ACCEPTS_FLAG(-mfix-cortex-a53-835769 CXX_ACCEPTS_MFIX_CORTEX_A53_835769)
     if (CXX_ACCEPTS_MFIX_CORTEX_A53_835769)
         set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfix-cortex-a53-835769")
@@ -148,7 +147,6 @@ if (WTF_CPU_ARM)
     int main() {}
    ")
 
-    include(CheckCXXSourceCompiles)
     CHECK_CXX_SOURCE_COMPILES("${ARM_THUMB2_TEST_SOURCE}" ARM_THUMB2_DETECTED)
     if (NOT ARM_THUMB2_DETECTED)
         set(ARM_TRADITIONAL_DETECTED TRUE)
@@ -158,7 +156,6 @@ if (WTF_CPU_ARM)
 endif ()
 
 # Use ld.gold if it is available and isn't disabled explicitly
-include(CMakeDependentOption)
 CMAKE_DEPENDENT_OPTION(USE_LD_GOLD "Use GNU gold linker" ON
                        "NOT CXX_ACCEPTS_MFIX_CORTEX_A53_835769;NOT ARM_TRADITIONAL_DETECTED;NOT WIN32;NOT APPLE" OFF)
 if (USE_LD_GOLD)
@@ -174,7 +171,6 @@ endif ()
 
 set(ENABLE_DEBUG_FISSION_DEFAULT OFF)
 if (USE_LD_GOLD AND CMAKE_BUILD_TYPE STREQUAL "Debug")
-    include(TestCXXAcceptsFlag)
     CHECK_CXX_ACCEPTS_FLAG(-gsplit-dwarf CXX_ACCEPTS_GSPLIT_DWARF)
     if (CXX_ACCEPTS_GSPLIT_DWARF)
         set(ENABLE_DEBUG_FISSION_DEFAULT ON)
@@ -235,12 +231,6 @@ if (NOT PORT STREQUAL "GTK")
 endif ()
 
 # Macros for determining HAVE values.
-include(CheckIncludeFile)
-include(CheckFunctionExists)
-include(CheckSymbolExists)
-include(CheckStructHasMember)
-include(CheckTypeSize)
-
 macro(_HAVE_CHECK_INCLUDE _variable _header)
     check_include_file(${_header} ${_variable}_value)
     SET_AND_EXPOSE_TO_BUILD(${_variable} ${_variable}_value)
index f2adc4c..9a298d3 100644 (file)
@@ -36,6 +36,19 @@ if (NOT HAS_RUN_WEBKIT_COMMON)
     # Helper macros and feature defines
     # -----------------------------------------------------------------------------
 
+    # To prevent multiple inclusion, most modules should be included once here.
+    include(CheckCXXSourceCompiles)
+    include(CheckFunctionExists)
+    include(CheckIncludeFile)
+    include(CheckSymbolExists)
+    include(CheckStructHasMember)
+    include(CheckTypeSize)
+    include(CMakeDependentOption)
+    include(CMakeParseArguments)
+    include(ProcessorCount)
+    include(TestCXXAcceptsFlag)
+
+    include(WebKitPackaging)
     include(WebKitMacros)
     include(WebKitFS)
     include(WebKitFeatures)
index 18a3fe1..89334e6 100644 (file)
@@ -2,10 +2,6 @@
 # exclusively needed in only one subdirectory of Source (e.g. only needed by
 # WebCore), then put it there instead.
 
-include(CMakeParseArguments)
-include(ProcessorCount)
-ProcessorCount(PROCESSOR_COUNT)
-
 macro(WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS)
     set(_file ${CMAKE_CURRENT_SOURCE_DIR}/Platform${PORT}.cmake)
     if (EXISTS ${_file})