Title: [208104] trunk
- Revision
- 208104
- Author
- [email protected]
- Date
- 2016-10-29 09:03:25 -0700 (Sat, 29 Oct 2016)
Log Message
[CMake][Win] Visual Studio invokes make_settings.pl twice
https://bugs.webkit.org/show_bug.cgi?id=163774
Patch by Fujii Hironori <[email protected]> on 2016-10-29
Reviewed by Michael Catanzaro.
build-webkit recompiles some files just after finishing
build-webkit in case of using CMake VisualStudio generator because
both WebCoreDerivedSources.vcxproj and WebCoreTestSupport.vcxproj
triggers make_settings.pl.
make_settings.pl generates four files
InternalSettingsGenerated.{h,cpp,idl} and SettingsMacros.h.
WebCoreDerivedSources depends on SettingsMacros.h, and
WebCoreTestSupport depends on InternalSettingsGenerated.cpp.
This problem is described in CMake documentation:
<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
To solve this problem, only SettingsMacros.h is specified as
OUTPUT of add_custom_command, and other generated files are marked
as BYPRODUCTS. As the result, only WebCoreDerivedSources target
triggers make_settings.pl. And other targets already have a
dependency to WebCoreDerivedSources target.
To support earlier versions than CMake 3.2, it uses GENERATED
source file property instead of BYPRODUCTS option.
* Source/cmake/WebKitMacros.cmake(GENERATE_SETTINGS_MACROS):
Removed extra output files from OUTPUT of add_custom_command and
added BYPRODUCTS option.
Modified Paths
Diff
Modified: trunk/ChangeLog (208103 => 208104)
--- trunk/ChangeLog 2016-10-29 15:22:39 UTC (rev 208103)
+++ trunk/ChangeLog 2016-10-29 16:03:25 UTC (rev 208104)
@@ -1,3 +1,39 @@
+2016-10-29 Fujii Hironori <[email protected]>
+
+ [CMake][Win] Visual Studio invokes make_settings.pl twice
+ https://bugs.webkit.org/show_bug.cgi?id=163774
+
+ Reviewed by Michael Catanzaro.
+
+ build-webkit recompiles some files just after finishing
+ build-webkit in case of using CMake VisualStudio generator because
+ both WebCoreDerivedSources.vcxproj and WebCoreTestSupport.vcxproj
+ triggers make_settings.pl.
+
+ make_settings.pl generates four files
+ InternalSettingsGenerated.{h,cpp,idl} and SettingsMacros.h.
+ WebCoreDerivedSources depends on SettingsMacros.h, and
+ WebCoreTestSupport depends on InternalSettingsGenerated.cpp.
+
+ This problem is described in CMake documentation:
+ <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
+
+ To solve this problem, only SettingsMacros.h is specified as
+ OUTPUT of add_custom_command, and other generated files are marked
+ as BYPRODUCTS. As the result, only WebCoreDerivedSources target
+ triggers make_settings.pl. And other targets already have a
+ dependency to WebCoreDerivedSources target.
+
+ To support earlier versions than CMake 3.2, it uses GENERATED
+ source file property instead of BYPRODUCTS option.
+
+ * Source/cmake/WebKitMacros.cmake(GENERATE_SETTINGS_MACROS):
+ Removed extra output files from OUTPUT of add_custom_command and
+ added BYPRODUCTS option.
+
2016-10-28 Fujii Hironori <[email protected]>
[CMake] Changing enabled features should trigger recompiling all IDL
Modified: trunk/Source/cmake/WebKitMacros.cmake (208103 => 208104)
--- trunk/Source/cmake/WebKitMacros.cmake 2016-10-29 15:22:39 UTC (rev 208103)
+++ trunk/Source/cmake/WebKitMacros.cmake 2016-10-29 16:03:25 UTC (rev 208104)
@@ -185,12 +185,25 @@
macro(GENERATE_SETTINGS_MACROS _infile _outfile)
set(NAMES_GENERATOR ${WEBCORE_DIR}/page/make_settings.pl)
+ # 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.
+ # <https://cmake.org/cmake/help/v3.0/command/add_custom_command.html>
+ set(_extra_output
+ ${DERIVED_SOURCES_WEBCORE_DIR}/InternalSettingsGenerated.h
+ ${DERIVED_SOURCES_WEBCORE_DIR}/InternalSettingsGenerated.cpp
+ ${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} ${DERIVED_SOURCES_WEBCORE_DIR}/InternalSettingsGenerated.h ${DERIVED_SOURCES_WEBCORE_DIR}/InternalSettingsGenerated.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/InternalSettingsGenerated.idl
+ OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/${_outfile}
MAIN_DEPENDENCY ${_infile}
DEPENDS ${NAMES_GENERATOR} ${SCRIPTS_BINDINGS}
COMMAND ${PERL_EXECUTABLE} ${NAMES_GENERATOR} --input ${_infile} --outputDir ${DERIVED_SOURCES_WEBCORE_DIR}
- VERBATIM)
+ VERBATIM ${_args})
endmacro()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes