[Webkit-unassigned] [Bug 163774] New: [CMake][Win] Visual Studio invokes make_settings.pl twice

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 20 22:57:40 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=163774

            Bug ID: 163774
           Summary: [CMake][Win] Visual Studio invokes make_settings.pl
                    twice
    Classification: Unclassified
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Tools / Tests
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: Hironori.Fujii at sony.com
                CC: lforschler at apple.com

Created attachment 292322
  --> https://bugs.webkit.org/attachment.cgi?id=292322&action=review
screenshot of Visual Studio

WebCoreDerivedSources.vcxproj and WebCoreTestSupport.vcxproj triggers make_settings.pl.
This causes unnecessary recompilation in CMake VisualStudio build.

make_settings.pl generates following files:

- SettingsMacros.h
- InternalSettingsGenerated.h
- InternalSettingsGenerated.cpp
- InternalSettingsGenerated.idl

WebCoreDerivedSources depends on SettingsMacros.h.
WebCoreTestSupport depends on InternalSettingsGenerated.cpp.

This problem is described in CMake document:

https://cmake.org/cmake/help/v3.0/command/add_custom_command.html

> Do not list the output in more than one independent target that may
> build in parallel or the two instances of the rule may conflict
> (instead use add_custom_target to drive the command and make the other
> targets depend on that one).

There are some solutions:

1) Split make_settings.pl
   For example, add some command arguments like following:
    'make_settings.pl --macros-header ...' generates SettingsMacros.h.
    'make_settings.pl --internal-idl ...' generates InternalSettingsGenerated.idl.
    'make_settings.pl --internal-source ...' generates InternalSettingsGenerated.cpp and InternalSettingsGenerated.h.
2) Write output files only if changed
   Use WriteFileIfChanged of preprocess-idls.pl
   WriteFileIfChanged has a bad effect (infinite regeneration, see Bug 131756)
3) Use add_custom_target
   But, add_custom_target invokes the command every time, I need to
   implement timestamp check in CMake or Perl
4) Implement timestamp check in make_settings.pl
5) Implement timestamp check in a new script (CMake, Python or Perl)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20161021/16849430/attachment-0001.html>


More information about the webkit-unassigned mailing list