Bug 127073

Summary: [GTK][CMake] build-webkit should try harder to avoid re-running cmake
Product: WebKit Reporter: Martin Robinson <mrobinson>
Component: WebKitGTKAssignee: Martin Robinson <mrobinson>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, dbates, pnormand
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch dbates: review+

Description Martin Robinson 2014-01-15 16:23:53 PST
When using build-webkit for incremental builds, having to rerun cmake constantly really breaks up flow. This will especially true once Ninja is working.
Comment 1 Martin Robinson 2014-01-15 16:35:17 PST
Created attachment 221315 [details]
Patch
Comment 2 Daniel Bates 2014-01-21 22:47:51 PST
Comment on attachment 221315 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=221315&action=review

> Tools/Scripts/build-webkit:303
> +    if (isNix()) {
> +        if ($noWebKit2) {
> +            print STDERR "Nix is a WebKit2 port, you can't disable WebKit2 on it!\n";
> +            exit 1;
> +        }
>  
> -    buildCMakeProjectOrExit($clean, "Nix", $prefixPath, $makeArgs, (cmakeBasedPortArguments(), cMakeArgsFromFeatures()), $cmakeArgs);
> -}
> +        $cmakeArgs = "-DWTF_USE_CURL=ON " . $cmakeArgs if $curl;
> +        $cmakeArgs = "-DWTF_USE_OPENGL_ES_2=ON " . $cmakeArgs if $opengles2;

This code isn't necessary as the Nix port is no longer applicable.

> Tools/Scripts/webkitdirs.pm:1719
> +sub cachedArgumentFileOutOfDate($@)

Maybe a better name for this function would be isCachedArgumentFileOutOfDate since this function returns a boolean result.

> Tools/Scripts/webkitdirs.pm:1896
> +    my $optionsCache = File::Spec->catdir(baseProductDir(), configuration(), 'build-webkit-options.txt');

Nit: ' (single quote) => " (double quote)

> Tools/Scripts/webkitdirs.pm:1912
> +    my $platformConfiguration = File::Spec->catdir(sourceDir(), 'Source', 'cmake', 'Options' . cmakeBasedPortName() . '.cmake');

Ditto.

> Tools/Scripts/webkitdirs.pm:1917
> +    my $globalConfiguration = File::Spec->catdir(sourceDir(), 'Source', 'cmake', 'OptionsCommon.cmake');

Ditto.

> Tools/Scripts/webkitdirs.pm:2047
> +    return isEfl() || isWinCE() || isNix() || isGtkCMake();

Remove isNix() as it's no longer applicable.
Comment 3 Martin Robinson 2014-01-22 11:51:37 PST
Committed r162545: <http://trac.webkit.org/changeset/162545>
Comment 4 Philippe Normand 2020-03-19 04:10:09 PDT
Comment on attachment 221315 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=221315&action=review

> Tools/Scripts/webkitdirs.pm:1928
> +    if (shouldRemoveCMakeCache(@buildArgs)) {

How could this ever work? This function expects 2 arguments, not one? See patch in https://bugs.webkit.org/show_bug.cgi?id=209277