[CMake] Raise minimum CMake requirement
authormcatanzaro@igalia.com <mcatanzaro@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 16 Jul 2017 14:28:12 +0000 (14:28 +0000)
committermcatanzaro@igalia.com <mcatanzaro@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 16 Jul 2017 14:28:12 +0000 (14:28 +0000)
https://bugs.webkit.org/show_bug.cgi?id=174545

Reviewed by Konstantin Tokarev.

.:

* CMakeLists.txt:
* Source/cmake/OptionsCommon.cmake:
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsJSCOnly.cmake:

Source/WebCore:

* WebCoreMacros.cmake:

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

CMakeLists.txt
ChangeLog
Source/WebCore/ChangeLog
Source/WebCore/WebCoreMacros.cmake
Source/cmake/OptionsCommon.cmake
Source/cmake/OptionsGTK.cmake
Source/cmake/OptionsJSCOnly.cmake

index 7c69c39..48c2d5f 100644 (file)
@@ -1,11 +1,6 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.3)
 project(WebKit)
 
-# This should be removed once we require CMake 3.3.
-if (POLICY CMP0058)
-    cmake_policy(SET CMP0058 NEW)
-endif ()
-
 set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/Source/cmake")
 
 set(ENABLE_WEBCORE ON)
index b12719f..528c8ba 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2017-07-16  Michael Catanzaro  <mcatanzaro@igalia.com>
+
+        [CMake] Raise minimum CMake requirement
+        https://bugs.webkit.org/show_bug.cgi?id=174545
+
+        Reviewed by Konstantin Tokarev.
+
+        * CMakeLists.txt:
+        * Source/cmake/OptionsCommon.cmake:
+        * Source/cmake/OptionsGTK.cmake:
+        * Source/cmake/OptionsJSCOnly.cmake:
+
 2017-07-14  Michael Catanzaro  <mcatanzaro@igalia.com>
 
         [CMake] Unclear distinction between WebKitHelpers and WebKitMacros
index f8ca00b..c919ebb 100644 (file)
@@ -1,3 +1,12 @@
+2017-07-16  Michael Catanzaro  <mcatanzaro@igalia.com>
+
+        [CMake] Raise minimum CMake requirement
+        https://bugs.webkit.org/show_bug.cgi?id=174545
+
+        Reviewed by Konstantin Tokarev.
+
+        * WebCoreMacros.cmake:
+
 2017-07-15  Brady Eidson  <beidson@apple.com>
 
         Make sure all CFHTTPCookieStorageRefs we create are scheduled.
index 7175beb..a3258ed 100644 (file)
@@ -163,13 +163,9 @@ function(GENERATE_BINDINGS target)
     if (SHOW_BINDINGS_GENERATION_PROGRESS)
         list(APPEND args --showProgress)
     endif ()
-    if (${CMAKE_VERSION} VERSION_LESS 3.2)
-        set_source_files_properties(${gen_sources} ${gen_headers} PROPERTIES GENERATED 1)
-    else ()
-        list(APPEND act_args BYPRODUCTS ${gen_sources} ${gen_headers})
-        if (SHOW_BINDINGS_GENERATION_PROGRESS)
-            list(APPEND act_args USES_TERMINAL)
-        endif ()
+    list(APPEND act_args BYPRODUCTS ${gen_sources} ${gen_headers})
+    if (SHOW_BINDINGS_GENERATION_PROGRESS)
+        list(APPEND act_args USES_TERMINAL)
     endif ()
     add_custom_target(${target}
         COMMAND ${PERL_EXECUTABLE} ${binding_generator} ${args}
@@ -229,10 +225,6 @@ macro(GENERATE_SETTINGS_MACROS _infile _outfile)
         ${DERIVED_SOURCES_WEBCORE_DIR}/InternalSettingsGenerated.idl
     )
     set(_args BYPRODUCTS ${_extra_output})
-    if (${CMAKE_VERSION} VERSION_LESS 3.2)
-        set_source_files_properties(${_extra_output} PROPERTIES GENERATED 1)
-        set(_args)
-    endif ()
     add_custom_command(
         OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/${_outfile}
         MAIN_DEPENDENCY ${_infile}
index 62e185b..813d0ee 100644 (file)
@@ -234,14 +234,6 @@ if (NOT PORT STREQUAL "GTK")
     set(LIBEXEC_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Absolute path to install executables executed by the library")
 endif ()
 
-# The Ninja generator does not yet know how to build archives in pieces, and so response
-# files must be used to deal with very long linker command lines.
-# CMake does this automatically, but the condition was wrong on Linux until CMake 3.2.
-# See https://cmake.org/Bug/view.php?id=14892
-if ((CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") AND (CMAKE_VERSION VERSION_LESS 3.2))
-    set(CMAKE_NINJA_FORCE_RESPONSE_FILE 1)
-endif ()
-
 # Macros for determining HAVE values.
 include(CheckIncludeFile)
 include(CheckFunctionExists)
index d0e3682..492949d 100644 (file)
@@ -474,24 +474,3 @@ macro(ADD_WHOLE_ARCHIVE_TO_LIBRARIES _list_name)
         set(${_list_name} "${${_list_name}_TMP}")
     endif ()
 endmacro()
-
-if (CMAKE_MAJOR_VERSION LESS 3)
-    # Before CMake 3 it was necessary to use a build script instead of using cmake --build directly
-    # to preserve colors and pretty-printing.
-
-    build_command(COMMAND_LINE_TO_BUILD)
-    # build_command unconditionally adds -i (ignore errors) for make, and there's
-    # no reasonable way to turn that off, so we just replace it with -k, which has
-    # the same effect, except that the return code will indicate that an error occurred.
-    # See: http://www.cmake.org/cmake/help/v3.0/command/build_command.html
-    string(REPLACE " -i" " -k" COMMAND_LINE_TO_BUILD ${COMMAND_LINE_TO_BUILD})
-    file(WRITE
-        ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/build.sh
-        "#!/bin/sh\n"
-        "${COMMAND_LINE_TO_BUILD} $@"
-    )
-    file(COPY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/build.sh
-        DESTINATION ${CMAKE_BINARY_DIR}
-        FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE
-    )
-endif ()
index 2acd333..26be3f5 100644 (file)
@@ -89,25 +89,3 @@ if (NOT APPLE)
 else ()
     set(ICU_LIBRARIES libicucore.dylib)
 endif ()
-
-# From OptionsGTK.cmake
-if (CMAKE_MAJOR_VERSION LESS 3)
-    # Before CMake 3 it was necessary to use a build script instead of using cmake --build directly
-    # to preserve colors and pretty-printing.
-
-    build_command(COMMAND_LINE_TO_BUILD)
-    # build_command unconditionally adds -i (ignore errors) for make, and there's
-    # no reasonable way to turn that off, so we just replace it with -k, which has
-    # the same effect, except that the return code will indicate that an error occurred.
-    # See: http://www.cmake.org/cmake/help/v3.0/command/build_command.html
-    string(REPLACE " -i" " -k" COMMAND_LINE_TO_BUILD ${COMMAND_LINE_TO_BUILD})
-    file(WRITE
-        ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/build.sh
-        "#!/bin/sh\n"
-        "${COMMAND_LINE_TO_BUILD} $@"
-    )
-    file(COPY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/build.sh
-        DESTINATION ${CMAKE_BINARY_DIR}
-        FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE
-    )
-endif ()