Title: [165473] trunk
Revision
165473
Author
[email protected]
Date
2014-03-12 08:48:13 -0700 (Wed, 12 Mar 2014)

Log Message

[GTK][CMAKE] Too verbose build output
https://bugs.webkit.org/show_bug.cgi?id=130076

Reviewed by Carlos Garcia Campos.

.:

* Source/cmake/OptionsGTK.cmake: Generate a script which does the actual build. This
works around an issue where cmake --build doesn't support ninja's pretty printing.

Tools:

Instead of building with cmake --build which isn't smart about pretty printing and
colors, we build with a script which calls the proper build command.

* Scripts/webkitdirs.pm:
(buildCMakeGeneratedProject): For GTK+ call the script that we generate during
the CMake configuration pass.

Modified Paths

Diff

Modified: trunk/ChangeLog (165472 => 165473)


--- trunk/ChangeLog	2014-03-12 15:41:55 UTC (rev 165472)
+++ trunk/ChangeLog	2014-03-12 15:48:13 UTC (rev 165473)
@@ -1,3 +1,13 @@
+2014-03-12  Martin Robinson  <[email protected]>
+
+        [GTK][CMAKE] Too verbose build output
+        https://bugs.webkit.org/show_bug.cgi?id=130076
+
+        Reviewed by Carlos Garcia Campos.
+
+        * Source/cmake/OptionsGTK.cmake: Generate a script which does the actual build. This
+        works around an issue where cmake --build doesn't support ninja's pretty printing.
+
 2014-03-10  Mario Sanchez Prada  <[email protected]>
 
         [GTK] Add support for Geoclue2

Modified: trunk/Source/cmake/OptionsGTK.cmake (165472 => 165473)


--- trunk/Source/cmake/OptionsGTK.cmake	2014-03-12 15:41:55 UTC (rev 165472)
+++ trunk/Source/cmake/OptionsGTK.cmake	2014-03-12 15:48:13 UTC (rev 165473)
@@ -299,3 +299,13 @@
     endforeach ()
     set(${_list_name} "${${_list_name}_TMP}")
 endmacro()
+
+build_command(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)

Modified: trunk/Tools/ChangeLog (165472 => 165473)


--- trunk/Tools/ChangeLog	2014-03-12 15:41:55 UTC (rev 165472)
+++ trunk/Tools/ChangeLog	2014-03-12 15:48:13 UTC (rev 165473)
@@ -1,3 +1,17 @@
+2014-03-12  Martin Robinson  <[email protected]>
+
+        [GTK][CMAKE] Too verbose build output
+        https://bugs.webkit.org/show_bug.cgi?id=130076
+
+        Reviewed by Carlos Garcia Campos.
+
+        Instead of building with cmake --build which isn't smart about pretty printing and
+        colors, we build with a script which calls the proper build command.
+
+        * Scripts/webkitdirs.pm:
+        (buildCMakeGeneratedProject): For GTK+ call the script that we generate during
+        the CMake configuration pass.
+
 2014-03-11  Martin Robinson  <[email protected]>
 
         [CMake] Newer versions of CMake cannot find older versions of Freetype

Modified: trunk/Tools/Scripts/webkitdirs.pm (165472 => 165473)


--- trunk/Tools/Scripts/webkitdirs.pm	2014-03-12 15:41:55 UTC (rev 165472)
+++ trunk/Tools/Scripts/webkitdirs.pm	2014-03-12 15:48:13 UTC (rev 165473)
@@ -2046,13 +2046,23 @@
     if (! -d $buildPath) {
         die "Must call generateBuildSystemFromCMakeProject() before building CMake project.";
     }
+
+    my $command = "cmake";
     my @args = ("--build", $buildPath, "--config", $config);
     push @args, ("--", $makeArgs) if $makeArgs;
 
+    # GTK uses a build script to preserve colors and pretty-printing.
+    if (isGtk()) {
+        chdir "$buildPath" or die;
+        $command = "$buildPath/build.sh";
+        @args = ($makeArgs);
+    }
+
     # We call system("cmake @args") instead of system("cmake", @args) so that @args is
     # parsed for shell metacharacters. In particular, $makeArgs may contain such metacharacters.
     my $wrapper = join(" ", jhbuildWrapperPrefixIfNeeded()) . " ";
-    return system($wrapper . "cmake @args");
+    return system($wrapper . "$command @args");
+
 }
 
 sub cleanCMakeGeneratedProject()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to