summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoGenInitializer.cxx
Commit message (Collapse)AuthorAgeFilesLines
* AutoGen: Account for CMP0116 in the depfileKyle Edwards2020-12-081-5/+18
| | | | Fixes: #21467
* GENERATED prop: Add implementation for policy CMP0118 being set to NEWDeniz Bahadir2020-11-241-1/+1
| | | | | | | | | | | | | | | | | | * Adding implementation for policy CMP0118 being set to `NEW`. * Adding new tests for policy CMP0118 being set to `NEW`. * Checking the `GENERATED` property with `get_source_file_property` or `get_property` now always returns exactly `1` or `0`. No other values will be returned. Note, that this is a backwards-incompatible change, even when policy CMP0118 is unset or set to `OLD`. * Additionally, as `get_source_file_property` and `get_property` now always check if a source-file was marked globally visible, even when CMP0118 is unset or set to `OLD`, they possibly return `1` where they might have returned `0` before the changes introduced by this commit. Note, that this is a backwards-incompatible change, even when policy CMP0118 is unset or set to `OLD`. * As a consequence, the tests for policy CMP0118 being unset or set to `OLD` got slightly adjusted, too, to reflect these changes in behavior.
* cmSourceFile::GetPropertyForUser: return cmPropVitaly Stakhovsky2020-11-041-1/+1
| | | | also fix GetSafeProperty() return type
* cmMakefile::GetDefinition: return cmPropVitaly Stakhovsky2020-09-021-2/+2
|
* Merge topic 'automoc-depend-project-file'Brad King2020-09-011-0/+1
|\ | | | | | | | | | | | | | | 776059ef0f Merge branch 'backport-3.17-automoc-depend-project-file' 6b20bbd2dd AutoMoc: Restore support for re-running after project file changes Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5166
| * Merge branch 'backport-3.17-automoc-depend-project-file'Brad King2020-08-311-0/+1
| |\
| | * AutoMoc: Restore support for re-running after project file changesJoerg Bornemann2020-08-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For Qt >= 5.15.0 and Ninja generators AutoMoc creates a depfile to let Ninja decide when to run AutoMoc. This was introduced by commit aebfbcaa46 (AutoGen: Use depfiles for the XXX_autogen ninja targets, 2020-01-14, v3.17.0-rc1~58^2). However, AutoMoc was not triggered after adding a new moc-able file to the project. This patch adds the project file (and potentially included files) to the dependencies in the depfile. Now, a re-run of AutoMoc is triggered if the project file changes. Fixes: #21127
* | | Merge topic 'automoc_timestamp_nmc_fix'Brad King2020-08-251-0/+4
|\ \ \ | |/ / | | | | | | | | | | | | | | | a48bb185c3 AutoGen: Fix moc and uic dependencies when building Qt itself Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5153
| * | AutoGen: Fix moc and uic dependencies when building Qt itselfAlexandru Croitor2020-08-251-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When building Qt itself, the moc and uic executables are spcecified via a generator expression of the form $<TARGET_FILE:Qt6::moc>, which ends populating Moc's and Uic's 'Executable' field but not the ExecutableTarget and ExecutableTargetName fields. In such a scenario, the code in cmQtAutoGenInitializer::InitAutogenTarget fails to add a dependency on moc (or uic), because ExecutableTarget is null. First try to add a dependency on the ExecutableTarget if it's not empty, otherwise try to add a dependency on the path specified in the 'Executable' field. Issue: #21118
* | | Merge topic 'automoc_timestamp_deps'Brad King2020-08-061-2/+45
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | 9a9ed4b9d3 Merge branch 'backport-3.17-automoc_timestamp_deps' 7445c9a58a AutoGen: Add test to check for correct AutoMoc dependencies a79056bb02 AutoGen: Fix over-specified direct dependencies of custom command Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Aleix <aleixpol@kde.org> Merge-request: !5085
| * | Merge branch 'backport-3.17-automoc_timestamp_deps'Brad King2020-08-051-2/+45
| |\ \ | | |/
| | * AutoGen: Fix over-specified direct dependencies of custom commandAlexandru Croitor2020-08-031-2/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The AutoMoc timestamp creating custom command explicitly depended on all dependencies of the origin target (associated to the AutoGen target). When an origin target depended on a shared library 'libfoo.so', if it was re-linked, the AutoMoc custom command would touch its output timestamp file, and thus cause needless rebuilding of sources, despite the shared library not having any influence on the AutoMoc generated files. Introduce a new '<target>_autogen_timestamp_deps' utility target, which will serve as an 'order-only' dependency for the custom command. This will prevent needless rebuilding, because touching 'libfoo.so' will not cause the custom command to be re-executed. The new AutoMoc dependency tree looks like: '_autogen_timestamp_deps (serves as order-only dep)' <- '<target_autogen>/timestamp' file ( + moc deps file) <- '<target>_autogen' target. Fixes: #21020
* | | Fix typos identified using codespellJean-Christophe Fillion-Robin2020-07-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See https://github.com/codespell-project/codespell#readme The following command was used: ``` codespell -q6 --skip="\ .git,\ *.json,\ ./Copyright.txt,\ ./Help/command/foreach.rst,\ ./Help/prop_test/REQUIRED_FILES.rst,\ ./Help/variable/CTEST_COVERAGE_COMMAND.rst,\ ./Modules/CMakeCheckCompilerFlagCommonPatterns.cmake,\ ./Modules/CMakeRCInformation.cmake,\ ./Modules/Internal/CPack/NSIS.template.in,\ ./Modules/FindMatlab.cmake,\ ./Modules/MatlabTestsRedirect.cmake,\ ./Modules/Platform/Windows-Clang.cmake,\ ./Modules/Platform/Windows-Intel-Fortran.cmake,\ ./Modules/Platform/Windows-MSVC.cmake,\ ./Source/CMakeVersion.cmake,\ ./Source/cmConvertMSBuildXMLToJSON.py,\ ./Source/cmCreateTestSourceList.cxx,\ ./Source/cmGlobalVisualStudio10Generator.cxx,\ ./Source/cmExportBuildFileGenerator.cxx,\ ./Source/cmExportInstallAndroidMKGenerator.cxx,\ ./Source/cmExportInstallFileGenerator.cxx,\ ./Source/cmExportSet.cxx,\ ./Source/cmExportTryCompileFileGenerator.cxx,\ ./Source/cmFindPackageCommand.cxx,\ ./Source/cmInstallCommand.cxx,\ ./Source/cmGeneratorExpressionLexer.cxx,\ ./Source/cmLocalVisualStudio7Generator.cxx,\ ./Source/cmOrderDirectories.cxx,\ ./Source/cmTarget.cxx,\ ./Source/kwsys/*,\ ./Source/QtDialog/CMakeSetupDialog.ui,\ ./Source/CPack/WiX/cmWIXRichTextFormatWriter.cxx,\ ./Source/CTest/cmParseCoberturaCoverage.h,\ ./Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in,\ ./Tests/RunCMake/CPack/tests/DMG_SLA/English.license.rtf,\ ./Tests/RunCMake/CPack/tests/DMG_SLA/German.license.txt,\ ./Tests/RunCMake/CPack/tests/DMG_SLA/German.menu.txt,\ ./Tests/RunCMake/GoogleTest/xml_output.cpp,\ ./Tests/RunCMake/Make/TargetMessages*,\ ./Utilities/*,\ " \ -L "\ dependees,\ endwhile,\ fo,\ filetest,\ helpfull,\ nd,\ objext,\ stoll,\ supercedes,\ superceded,\ vas,\ varn,\ " ```
* | | Merge topic 'cmnonempty'Kyle Edwards2020-07-151-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | eaad8072ee cmNonempty: Convenience inlines to check for non-empty string Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5017
| * | | cmNonempty: Convenience inlines to check for non-empty stringVitaly Stakhovsky2020-07-141-1/+1
| | | |
* | | | cmIsOn: add overload accepting const std::string*Vitaly Stakhovsky2020-07-141-1/+1
|/ / /
* | | cmMakefile: Refactor API to better handle empty config valuesRobert Maynard2020-07-031-4/+3
| | |
* | | Refactor file extension queries to be more consistentRobert Maynard2020-06-221-4/+4
|/ / | | | | | | | | It was very easy to forgot to check against all language file extensions. This updates the internal API to have a unified API.
* | Merge topic 'getdef-expand'Brad King2020-06-021-3/+2
|\ \ | | | | | | | | | | | | | | | | | | 7ed8c9ebe3 cmMakefile: add GetDefExpandList() that splits value into std::vector Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4819
| * | cmMakefile: add GetDefExpandList() that splits value into std::vectorVitaly Stakhovsky2020-05-301-3/+2
| | | | | | | | | | | | Combines cmMakefile:GetDefinition() and cmExpandList()
* | | Single location for cmProp typedefVitaly Stakhovsky2020-06-011-0/+1
|/ /
* | Refactoring: Third-parties public headers are under cm3p prefixMarc Chevrier2020-05-071-3/+3
| | | | | | | | Fixes: #20666
* | GetSafeProperty: return std::string const&Vitaly Stakhovsky2020-04-301-4/+5
| |
* | cmGeneratorTarget::GetProperty: return cmPropVitaly Stakhovsky2020-04-291-8/+5
| |
* | Refactoring: add cm::contains to <cmext/algorithm>Marc Chevrier2020-04-171-4/+4
| |
* | Add support to indicate UTF-8 custom command pipe output encodingJustin Goshi2020-04-131-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a flag to indicate that pipe output from a custom command should be interpreted as UTF-8 encoded. This change does not introduce a public way to set the flag, but generators that create internally-generated commands know if they are calling cmake, which uses UTF-8 pipes. MSBuild added support for interpreting output of PreBuildEvent, PreLinkEvent, PostBuildEvent, and CustomBuildStep as UTF-8. This change will appear in Visual Studio 16.6 Preview 3. It is opt-in, and you need to add the StdOutEncoding tag. MSBuild treats these as property bags so if we emit the tag for earlier versions of Visual Studio it would be safely ignored. This change emits the StdOutEncoding tag and sets it to UTF-8 whenever the custom command UTF-8 pipe flag is set. This fixes globalization issues when the output from cmake contained characters that required MSBuild to interpret as UTF-8 before displaying them.
* | cmMakefile::GetProperty: return cmPropVitaly Stakhovsky2020-04-011-5/+12
| |
* | cmState::GetGlobalProperty: return cmPropVitaly Stakhovsky2020-03-251-8/+10
|/
* Ninja Multi-Config: Fix issue with framework dependencies and AutogenKyle Edwards2020-02-171-7/+8
| | | | Fixes: #20345
* Fix AUTOMOC deps file to contain correct rule nameAlexandru Croitor2020-01-311-1/+8
| | | | | | | The rule name should include the current binary path relative to the top level binary path. Fixes: #20298
* Merge topic 'automoc-using-depfiles'Brad King2020-01-301-6/+49
|\ | | | | | | | | | | | | | | | | | | aebfbcaa46 AutoGen: Use depfiles for the XXX_autogen ninja targets f765fdea03 AutoGen: Use moc's feature to output dependencies f8c505d4b3 Add a parser for GCC-style depfiles Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Jan Niklas Hasse <jhasse@bixense.com> Merge-request: !4221
| * AutoGen: Use depfiles for the XXX_autogen ninja targetsJoerg Bornemann2020-01-281-6/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The XXX_autogen targets are implemented as utility commands, which means they always run, even if there weren't any changes. For the Ninja generator and Qt >= 5.15 we're taking a different approach: This commit adds custom commands that create XXX_autogen/timestamp files. Those custom commands have a depfile assigned that is generated from the depfiles that were created by moc. The XXX_autogen targets merely wrap the XXX_autogen/timestamp custom commands. Fixes: #18749
| * AutoGen: Use moc's feature to output dependenciesJoerg Bornemann2020-01-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Qt version 5.15.0 moc learned to output the dependencies of the generated file. This commit enhances JobCompileMocT to read the dependency file written by moc. The dependencies are stored in the same cache that's used for the dependencies determined by dependency filters. The dependency filter functionality is turned off if moc's dependency output feature is used. Fixes: #17750 Fixes: #19058
* | cm::String: enhance compatibility with STLMarc Chevrier2020-01-251-1/+0
|/
* Merge topic 'autogen_rcc_skip_unity'Brad King2020-01-201-10/+14
|\ | | | | | | | | | | | | | | 086d9b2bab Autogen: Enable SKIP_UNITY_BUILD_INCLUSION on AUTORCC generated files Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Cristian Adam <cristian.adam@gmail.com> Merge-request: !4237
| * Autogen: Enable SKIP_UNITY_BUILD_INCLUSION on AUTORCC generated filesSebastian Holtermann2020-01-171-10/+14
| | | | | | | | | | | | | | | | | | | | `rcc` generated files are not compatible with unity builds, because they contain classes in anonymous namespaces and static data with identical names. This patch sets the source file property `SKIP_UNITY_BUILD_INCLUSION` to `On` on all `AUTORCC` generated files to exclude them from unity build files. Fixes: #20191 "QT5: Exclude resource files from unity build"
* | cmMakefile: modernize memory managementMarc Chevrier2020-01-141-5/+5
| |
* | Autogen: Process .hh headers based on new policy CMP0100 settingsSebastian Holtermann2020-01-041-40/+87
| | | | | | | | | | | | | | Reintroduces .hh header processing in AUTOMOC and AUTOUIC based on the new policy CMP0100 setting. Fixes: #13904 CMAKE_AUTOMOC misses headers with ".hh" extension
* | Autogen: Try adding header suffix to moc output file name on name conflictsSebastian Holtermann2020-01-041-13/+31
| | | | | | | | | | | | | | In AUTOGEN, this changes the moc output file name computation on output name conflicts to first try to add the header suffix to the moc output base name. When that still conflicts, we try adding a range of sequential numbers. If we still can't find an unique output name, we raise an error.
* | Merge topic 'autogen-no-hh'Brad King2019-12-191-2/+4
|\ \ | |/ | | | | | | | | | | 7fa7f55230 Autogen: Revert processing of .hh files for compatibility Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4146
| * Autogen: Revert processing of .hh files for compatibilityBrad King2019-12-181-2/+4
| | | | | | | | | | | | | | | | | | | | Since commit 4a9154537c (Autogen: Use cmake::IsHeader/SourceExtension for file type detection, 2019-07-02, v3.16.0-rc1~470^2~4) we process `.hh` files with `AUTOMOC`. However, this change can break existing projects that do not expect the behavior. Revert it for now. It can be restored later via a policy. Fixes: #20101
* | Merge topic 'stdstring-target'Brad King2019-12-171-4/+4
|\ \ | | | | | | | | | | | | | | | | | | c34b4497f8 cmTarget: add std::string overloads Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4137
| * | cmTarget: add std::string overloadsVitaly Stakhovsky2019-12-141-4/+4
| | |
* | | Ninja: Add multi-config variantKyle Edwards2019-12-131-3/+10
|/ / | | | | | | Co-Authored-by: vector-of-bool <vectorofbool@gmail.com>
* | cmMakefile: Delay custom command creationDaniel Eiband2019-11-241-8/+7
| | | | | | | | | | | | | | | | Move custom command creation to cmLocalGenerator and dispatch custom commands in cmMakefile to generate time. Generators add custom commands using the new methods provided by cmLocalGenerator. Issue: #12877
* | cmCustomCommand: Explicitly pass backtrace on constructionDaniel Eiband2019-11-241-2/+2
| |
* | cmLocalGenerator: modernize memory managementMarc Chevrier2019-11-111-2/+2
|/
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-20/+21
| | | | | Run the `clang-format.bash` script to update our C and C++ code to a new include order `.clang-format`. Use `clang-format` version 6.0.
* cmCustomCommand: Move custom commandsDaniel Eiband2019-09-261-1/+1
|
* cmMakefile: Move enumerations into new headerDaniel Eiband2019-09-261-4/+4
| | | | The enumerations will also be used in cmLocalGenerator.