Title: [195242] trunk
Revision
195242
Author
[email protected]
Date
2016-01-18 17:23:08 -0800 (Mon, 18 Jan 2016)

Log Message

[CMake] Duplicate attempts to find software during cmake stage
https://bugs.webkit.org/show_bug.cgi?id=153211

Reviewed by Martin Robinson.

* CMakeLists.txt: Remove duplication of commands in WebKitCommon.cmake.
* Source/cmake/WebKitCommon.cmake: Guard the entire file so it runs only once.

Modified Paths

Diff

Modified: trunk/CMakeLists.txt (195241 => 195242)


--- trunk/CMakeLists.txt	2016-01-19 01:08:47 UTC (rev 195241)
+++ trunk/CMakeLists.txt	2016-01-19 01:23:08 UTC (rev 195242)
@@ -16,11 +16,6 @@
     set(ENABLE_TOOLS ON)
 endif ()
 
-include(WebKitMacros)
-include(WebKitFS)
-include(WebKitHelpers)
-include(WebKitFeatures)
-
 # -----------------------------------------------------------------------------
 # Determine which port will be built
 # -----------------------------------------------------------------------------
@@ -110,19 +105,18 @@
 option(SHOULD_INSTALL_JS_SHELL "generate an installation rule to install the built _javascript_ shell")
 
 # -----------------------------------------------------------------------------
-# Common options
+# Common configuration
 #------------------------------------------------------------------------------
-include(OptionsCommon)
+include(WebKitCommon)
+
+# -----------------------------------------------------------------------------
+# Output directories
+#------------------------------------------------------------------------------
 set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
 set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
 
 # -----------------------------------------------------------------------------
-# Port-specific options
-# -----------------------------------------------------------------------------
-include(Options${PORT})
-
-# -----------------------------------------------------------------------------
 # Enable API unit tests and create a target for the test runner
 # -----------------------------------------------------------------------------
 if (ENABLE_API_TESTS)
@@ -150,8 +144,3 @@
 # Print the features list last, for maximum visibility.
 # -----------------------------------------------------------------------------
 PRINT_WEBKIT_OPTIONS()
-
-# -----------------------------------------------------------------------------
-# Create the configuration header
-# -----------------------------------------------------------------------------
-CREATE_CONFIGURATION_HEADER()

Modified: trunk/ChangeLog (195241 => 195242)


--- trunk/ChangeLog	2016-01-19 01:08:47 UTC (rev 195241)
+++ trunk/ChangeLog	2016-01-19 01:23:08 UTC (rev 195242)
@@ -1,3 +1,13 @@
+2016-01-18  Michael Catanzaro  <[email protected]>
+
+        [CMake] Duplicate attempts to find software during cmake stage
+        https://bugs.webkit.org/show_bug.cgi?id=153211
+
+        Reviewed by Martin Robinson.
+
+        * CMakeLists.txt: Remove duplication of commands in WebKitCommon.cmake.
+        * Source/cmake/WebKitCommon.cmake: Guard the entire file so it runs only once.
+
 2016-01-17  Michael Catanzaro  <[email protected]>
 
         [CMake] Do not build bmalloc when USE_SYSTEM_MALLOC is ON

Modified: trunk/Source/cmake/WebKitCommon.cmake (195241 => 195242)


--- trunk/Source/cmake/WebKitCommon.cmake	2016-01-19 01:08:47 UTC (rev 195241)
+++ trunk/Source/cmake/WebKitCommon.cmake	2016-01-19 01:23:08 UTC (rev 195242)
@@ -1,37 +1,54 @@
 # -----------------------------------------------------------------------------
-# Find common packages (used by all ports)
+# This file is included individually from various subdirectories (JSC, WTF,
+# WebCore, WebKit) in order to allow scripts to build only part of WebKit.
+# We want to run this file only once.
 # -----------------------------------------------------------------------------
-if (WIN32)
-    list(APPEND CMAKE_PROGRAM_PATH $ENV{SystemDrive}/cygwin/bin)
-endif ()
+if (NOT HAS_RUN_WEBKIT_COMMON)
+    set(HAS_RUN_WEBKIT_COMMON TRUE)
 
-find_package(BISON 2.1 REQUIRED)
-if (!APPLE)
-    find_package(FLEX 2.5.34 REQUIRED)
-endif ()
+    # -----------------------------------------------------------------------------
+    # Find common packages (used by all ports)
+    # -----------------------------------------------------------------------------
+    if (WIN32)
+        list(APPEND CMAKE_PROGRAM_PATH $ENV{SystemDrive}/cygwin/bin)
+    endif ()
 
-# TODO Enforce version requirement for gperf
-find_package(Gperf 3.0.1 REQUIRED)
+    find_package(BISON 2.1 REQUIRED)
+    if (!APPLE)
+        find_package(FLEX 2.5.34 REQUIRED)
+    endif ()
 
-# TODO Enforce version requirement for perl
-find_package(Perl 5.10.0 REQUIRED)
+    # TODO Enforce version requirement for gperf
+    find_package(Gperf 3.0.1 REQUIRED)
 
-find_package(PythonInterp 2.7.0 REQUIRED)
+    # TODO Enforce version requirement for perl
+    find_package(Perl 5.10.0 REQUIRED)
 
-# We cannot check for RUBY_FOUND because it is set only when the full package is installed and
-# the only thing we need is the interpreter. Unlike Python, cmake does not provide a macro
-# for finding only the Ruby interpreter.
-find_package(Ruby 1.9)
-if (NOT RUBY_EXECUTABLE OR RUBY_VERSION VERSION_LESS 1.9)
-    message(FATAL_ERROR "Ruby 1.9 or higher is required.")
-endif ()
+    find_package(PythonInterp 2.7.0 REQUIRED)
 
-include(WebKitMacros)
-include(WebKitFS)
-include(WebKitHelpers)
-include(WebKitFeatures)
+    # We cannot check for RUBY_FOUND because it is set only when the full package is installed and
+    # the only thing we need is the interpreter. Unlike Python, cmake does not provide a macro
+    # for finding only the Ruby interpreter.
+    find_package(Ruby 1.9)
+    if (NOT RUBY_EXECUTABLE OR RUBY_VERSION VERSION_LESS 1.9)
+        message(FATAL_ERROR "Ruby 1.9 or higher is required.")
+    endif ()
 
-include(OptionsCommon)
-include(Options${PORT})
+    # -----------------------------------------------------------------------------
+    # Helper macros and feature defines
+    # -----------------------------------------------------------------------------
 
-CREATE_CONFIGURATION_HEADER()
+    include(WebKitMacros)
+    include(WebKitFS)
+    include(WebKitHelpers)
+    include(WebKitFeatures)
+
+    include(OptionsCommon)
+    include(Options${PORT})
+
+    # -----------------------------------------------------------------------------
+    # config.h
+    # -----------------------------------------------------------------------------
+
+    CREATE_CONFIGURATION_HEADER()
+endif ()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to