Changeset 195242 in webkit


Ignore:
Timestamp:
Jan 18, 2016 5:23:08 PM (8 years ago)
Author:
Michael Catanzaro
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.
Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/CMakeLists.txt

    r190321 r195242  
    1616    set(ENABLE_TOOLS ON)
    1717endif ()
    18 
    19 include(WebKitMacros)
    20 include(WebKitFS)
    21 include(WebKitHelpers)
    22 include(WebKitFeatures)
    2318
    2419# -----------------------------------------------------------------------------
     
    111106
    112107# -----------------------------------------------------------------------------
    113 # Common options
     108# Common configuration
    114109#------------------------------------------------------------------------------
    115 include(OptionsCommon)
     110include(WebKitCommon)
     111
     112# -----------------------------------------------------------------------------
     113# Output directories
     114#------------------------------------------------------------------------------
    116115set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
    117116set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
    118117set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
    119 
    120 # -----------------------------------------------------------------------------
    121 # Port-specific options
    122 # -----------------------------------------------------------------------------
    123 include(Options${PORT})
    124118
    125119# -----------------------------------------------------------------------------
     
    151145# -----------------------------------------------------------------------------
    152146PRINT_WEBKIT_OPTIONS()
    153 
    154 # -----------------------------------------------------------------------------
    155 # Create the configuration header
    156 # -----------------------------------------------------------------------------
    157 CREATE_CONFIGURATION_HEADER()
  • trunk/ChangeLog

    r195183 r195242  
     12016-01-18  Michael Catanzaro  <mcatanzaro@igalia.com>
     2
     3        [CMake] Duplicate attempts to find software during cmake stage
     4        https://bugs.webkit.org/show_bug.cgi?id=153211
     5
     6        Reviewed by Martin Robinson.
     7
     8        * CMakeLists.txt: Remove duplication of commands in WebKitCommon.cmake.
     9        * Source/cmake/WebKitCommon.cmake: Guard the entire file so it runs only once.
     10
    1112016-01-17  Michael Catanzaro  <mcatanzaro@igalia.com>
    212
  • trunk/Source/cmake/WebKitCommon.cmake

    r194809 r195242  
    11# -----------------------------------------------------------------------------
    2 # Find common packages (used by all ports)
     2# This file is included individually from various subdirectories (JSC, WTF,
     3# WebCore, WebKit) in order to allow scripts to build only part of WebKit.
     4# We want to run this file only once.
    35# -----------------------------------------------------------------------------
    4 if (WIN32)
    5     list(APPEND CMAKE_PROGRAM_PATH $ENV{SystemDrive}/cygwin/bin)
     6if (NOT HAS_RUN_WEBKIT_COMMON)
     7    set(HAS_RUN_WEBKIT_COMMON TRUE)
     8
     9    # -----------------------------------------------------------------------------
     10    # Find common packages (used by all ports)
     11    # -----------------------------------------------------------------------------
     12    if (WIN32)
     13        list(APPEND CMAKE_PROGRAM_PATH $ENV{SystemDrive}/cygwin/bin)
     14    endif ()
     15
     16    find_package(BISON 2.1 REQUIRED)
     17    if (!APPLE)
     18        find_package(FLEX 2.5.34 REQUIRED)
     19    endif ()
     20
     21    # TODO Enforce version requirement for gperf
     22    find_package(Gperf 3.0.1 REQUIRED)
     23
     24    # TODO Enforce version requirement for perl
     25    find_package(Perl 5.10.0 REQUIRED)
     26
     27    find_package(PythonInterp 2.7.0 REQUIRED)
     28
     29    # We cannot check for RUBY_FOUND because it is set only when the full package is installed and
     30    # the only thing we need is the interpreter. Unlike Python, cmake does not provide a macro
     31    # for finding only the Ruby interpreter.
     32    find_package(Ruby 1.9)
     33    if (NOT RUBY_EXECUTABLE OR RUBY_VERSION VERSION_LESS 1.9)
     34        message(FATAL_ERROR "Ruby 1.9 or higher is required.")
     35    endif ()
     36
     37    # -----------------------------------------------------------------------------
     38    # Helper macros and feature defines
     39    # -----------------------------------------------------------------------------
     40
     41    include(WebKitMacros)
     42    include(WebKitFS)
     43    include(WebKitHelpers)
     44    include(WebKitFeatures)
     45
     46    include(OptionsCommon)
     47    include(Options${PORT})
     48
     49    # -----------------------------------------------------------------------------
     50    # config.h
     51    # -----------------------------------------------------------------------------
     52
     53    CREATE_CONFIGURATION_HEADER()
    654endif ()
    7 
    8 find_package(BISON 2.1 REQUIRED)
    9 if (!APPLE)
    10     find_package(FLEX 2.5.34 REQUIRED)
    11 endif ()
    12 
    13 # TODO Enforce version requirement for gperf
    14 find_package(Gperf 3.0.1 REQUIRED)
    15 
    16 # TODO Enforce version requirement for perl
    17 find_package(Perl 5.10.0 REQUIRED)
    18 
    19 find_package(PythonInterp 2.7.0 REQUIRED)
    20 
    21 # We cannot check for RUBY_FOUND because it is set only when the full package is installed and
    22 # the only thing we need is the interpreter. Unlike Python, cmake does not provide a macro
    23 # for finding only the Ruby interpreter.
    24 find_package(Ruby 1.9)
    25 if (NOT RUBY_EXECUTABLE OR RUBY_VERSION VERSION_LESS 1.9)
    26     message(FATAL_ERROR "Ruby 1.9 or higher is required.")
    27 endif ()
    28 
    29 include(WebKitMacros)
    30 include(WebKitFS)
    31 include(WebKitHelpers)
    32 include(WebKitFeatures)
    33 
    34 include(OptionsCommon)
    35 include(Options${PORT})
    36 
    37 CREATE_CONFIGURATION_HEADER()
Note: See TracChangeset for help on using the changeset viewer.