Title: [173964] trunk
Revision
173964
Author
[email protected]
Date
2014-09-25 07:45:22 -0700 (Thu, 25 Sep 2014)

Log Message

[Gtk] build.sh needs a -- before make options when the build command is cmake --build
https://bugs.webkit.org/show_bug.cgi?id=136377

Patch by Carlos Garcia Campos <[email protected]> on 2014-09-25
Reviewed by Philippe Normand.

.:

* Source/cmake/OptionsGTK.cmake: Only create the build.sh script
for CMake versions less than 3.

Tools:

* Scripts/webkitdirs.pm:
(buildCMakeGeneratedProject): Only use the build.sh script if it exists.

Modified Paths

Diff

Modified: trunk/ChangeLog (173963 => 173964)


--- trunk/ChangeLog	2014-09-25 14:21:19 UTC (rev 173963)
+++ trunk/ChangeLog	2014-09-25 14:45:22 UTC (rev 173964)
@@ -1,3 +1,13 @@
+2014-09-25  Carlos Garcia Campos  <[email protected]>
+
+        [Gtk] build.sh needs a -- before make options when the build command is cmake --build
+        https://bugs.webkit.org/show_bug.cgi?id=136377
+
+        Reviewed by Philippe Normand.
+
+        * Source/cmake/OptionsGTK.cmake: Only create the build.sh script
+        for CMake versions less than 3.
+
 2014-09-25  Csaba Osztrogonác  <[email protected]>
 
         Remove WinCE port from trunk

Modified: trunk/Source/cmake/OptionsGTK.cmake (173963 => 173964)


--- trunk/Source/cmake/OptionsGTK.cmake	2014-09-25 14:21:19 UTC (rev 173963)
+++ trunk/Source/cmake/OptionsGTK.cmake	2014-09-25 14:45:22 UTC (rev 173964)
@@ -362,21 +362,27 @@
     set(${_list_name} "${${_list_name}_TMP}")
 endmacro()
 
-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)
+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 ()
+
 if (ENABLE_SUBTLE_CRYPTO)
     find_package(GnuTLS 3.0.0 REQUIRED)
 endif ()

Modified: trunk/Tools/ChangeLog (173963 => 173964)


--- trunk/Tools/ChangeLog	2014-09-25 14:21:19 UTC (rev 173963)
+++ trunk/Tools/ChangeLog	2014-09-25 14:45:22 UTC (rev 173964)
@@ -1,3 +1,13 @@
+2014-09-25  Carlos Garcia Campos  <[email protected]>
+
+        [Gtk] build.sh needs a -- before make options when the build command is cmake --build
+        https://bugs.webkit.org/show_bug.cgi?id=136377
+
+        Reviewed by Philippe Normand.
+
+        * Scripts/webkitdirs.pm:
+        (buildCMakeGeneratedProject): Only use the build.sh script if it exists.
+
 2014-09-25  Akos Kiss  <[email protected]>
 
         [EFL] Split the list of dependencies to make sure that at least the universally available packages get installed

Modified: trunk/Tools/Scripts/webkitdirs.pm (173963 => 173964)


--- trunk/Tools/Scripts/webkitdirs.pm	2014-09-25 14:21:19 UTC (rev 173963)
+++ trunk/Tools/Scripts/webkitdirs.pm	2014-09-25 14:45:22 UTC (rev 173964)
@@ -1823,8 +1823,8 @@
     my @args = ("--build", $buildPath, "--config", $config);
     push @args, ("--", $makeArgs) if $makeArgs;
 
-    # GTK uses a build script to preserve colors and pretty-printing.
-    if (isGtk()) {
+    # GTK can use a build script to preserve colors and pretty-printing.
+    if (isGtk() && -e "$buildPath/build.sh") {
         chdir "$buildPath" or die;
         $command = "$buildPath/build.sh";
         @args = ($makeArgs);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to