summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoGenInitializer.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Autogen/RCC: Disable zstd if it is not supportedOrkun Tokdemir2024-02-091-0/+21
| | | | | | | | | Add the `--no-zstd` argument for `RCC` when `QT_FEATURE_zstd` is `OFF`. This causes user project builds to fail. That bug is fixed in Qt by https://codereview.qt-project.org/c/qt/qtbase/+/537546 but for the older versions, fix it here too. Fixes: #25664
* Merge topic 'autogen-makefile-depfile'Brad King2024-01-291-2/+11
|\ | | | | | | | | | | | | | | d0bedb2170 Autogen: Forward dependencies when both Makefile and DEPFILE are used 4deb9c41b8 cmQtAutoGenInitializer: Improve Const-correctness Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9190
| * Autogen: Forward dependencies when both Makefile and DEPFILE are usedOrkun Tokdemir2024-01-281-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | Since commit ebc9e448b3 (Autogen: Add depfile support for Makefiles, 2023-09-07, v3.28.0-rc1~101^2~1) CMake does not generate the correct dependency graph when both `Makefile` and `DEPFILE` are used. The build of `<target_name>_autogen_timestamp_deps` fails due to missing dependencies. To tackle that problem, forward target dependencies to both `<target_name>_autogen_timestamp_deps` and `<target_name>_autogen` instead of just `<target_name>_autogen`. Fixes: #25600
| * cmQtAutoGenInitializer: Improve Const-correctnessOrkun Tokdemir2024-01-261-1/+1
| |
* | Autogen: AUTO*_EXECUTABLE: add support for per-config valuesOrkun Tokdemir2024-01-171-97/+275
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Per-config values were added to `AUTO*_EXECUTABLE`. * Dependency order was refactored for `cmake_autogen` and `cmake_autorcc` to avoid unnecessary rebuilds. * A new parameter was added for `cmake_autogen` and `cmake_autorcc` to specify the config name of the `auto*_executable` to be used. * Add `AUTOGEN_BETTER_GRAPH_MULTI_CONFIG` target property to change the behavior of the dependency graph. * The timestamp target is split into three targets for per-config to avoid redundant `mocs_compilation` builds when `AUTOGEN_BETTER_GRAPH_MULTI_CONFIG` is ON * Per-config `DEP_FILE_RULE_NAME` values were added to `AutogenInfo.json` for `Multi-Config` usage. * Some functions were refactored to avoid code duplication. This commit reimplements fddd0f0443b4ce81d61f15ee1b2f13105967b25a Fixes: #20074
* | Merge topic 'cmake-sources-no-scan'Brad King2023-12-121-0/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | 91b7bf59a7 cmGlobalXCodeGenerator: disable C++ module scanning for force-lang files 9e19a61ddb cmLocalGenerator: disable C++ module scanning for unity sources fa9a72a788 cmLocalGenerator: disable C++ module scanning for copied PCH sources e5dce1a37e cmQtAutoGenInitializer: disable C++ module scanning for autogen sources 4fd596c34c cmGeneratorTarget: disable C++ module scanning for verify targets Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !9064
| * cmQtAutoGenInitializer: disable C++ module scanning for autogen sourcesBen Boeckel2023-12-111-0/+1
| |
* | Autogen: Add support for response files for moc predef targetstophoo2023-11-161-0/+36
|/ | | | | Add support for response files for moc predef targets and make the limit when to use response files for autogen targets configurable.
* Autogen: Revert "AUTO*_EXECUTABLE: add support for per-config values"Orkun Tokdemir2023-10-131-260/+107
| | | | | | | | | | | Changing the `timestamp` file to `timestamp_$<CONFIG>` causes some user projects to break when using Qt versions older than 6.6. Revert commit fddd0f0443 (Autogen: AUTO*_EXECUTABLE: add support for per-config values, 2023-06-14, v3.28.0-rc1~96^2~1) pending further investigation. Issue: #20074
* AutoGen: Fix regression in timestamps on multi-config generatorsOrkun Tokdemir2023-09-261-2/+9
| | | | | | | | | | | | | | Since commit fddd0f0443 (Autogen: AUTO*_EXECUTABLE: add support for per-config values, 2023-06-14) we do not correctly generate outputs for one configuration after another configuration has been built. Fix this: - Revert some config based stuff for `Xcode` due to the `$<CONFIG>` genex usage limitation in source files with `Xcode`. - For multi-config generators use a per-config `timestamp_$<CONFIG>` file instead of one `timestamp` file. Fixes: #25261
* Autogen: AUTO*_EXECUTABLE: add support for per-config valuesOrkun Tokdemir2023-09-131-106/+253
| | | | | | | | | | | | * Per-config values were added to `AUTO*_EXECUTABLE`. * Dependency order was refactored for `cmake_autogen` and `cmake_autorcc` to avoid unnecessary rebuilds. * A new parameter was added for `cmake_autogen` and `cmake_autorcc` to specify the config name of the `auto*_executable` to be used. * The timestamp target was split into three targets for per-config to avoid redundant `mocs_compilation` builds. * Per-config `DEP_FILE_RULE_NAME` values were added to `AutogenInfo.json` for `CMAKE_CROSS_CONFIG` usage. * Some functions were refactored to avoid code duplication. Fixes: #20074
* cmQtAutoGenInitializer: Define CrossConfig variableOrkun Tokdemir2023-09-131-5/+5
|
* cmQtAutoGenInitializer: Reduce string copiesOrkun Tokdemir2023-09-131-1/+1
|
* cmQtAutoGenInitializer: Remove no-op callOrkun Tokdemir2023-09-131-3/+0
|
* cmQtAutoGenInitializer: Improve Const-CorrectnessOrkun Tokdemir2023-09-131-3/+4
|
* Autogen: Fix typoOrkun Tokdemir2023-09-131-4/+4
|
* Autogen: Add depfile support for MakefilesOrkun Tokdemir2023-09-111-6/+11
| | | | Fixes: #21677
* cmQtAutoGenInitializer: Reduce string copiesOrkun Tokdemir2023-05-311-1/+1
|
* cmQtAutoGenInitializer: Remove no-op callsOrkun Tokdemir2023-05-311-4/+0
|
* cmQtAutoGenInitializer: Improve const correctnessOrkun Tokdemir2023-05-311-4/+4
|
* Autogen: Fix multi-config generated file issueOrkun Tokdemir2023-05-271-10/+39
| | | | | | | | | The default config was an empty string when a `multi-config` generator is used. An if check was added for those situations. If a source file has a specific config configuration, it is used with `$<CONFIG>` in the `multi-config` generator usage. Fixes: #24848
* Autogen: Optimize cmake_autogen execution for CROSS_CONFIG usageOrkun Tokdemir2023-05-261-3/+17
| | | | | | The redundant `cmake_autogen` process execution was optimized for non-`CROSS_CONFIGS` usage. It was executed three times for each config although only one of them is needed.
* Improve Const CorrectnessOrkun Tokdemir2023-05-261-13/+13
|
* Autogen: set SKIP_LINTING ON for generated filesOrkun Tokdemir2023-05-161-0/+1
| | | | Fixes: #19772
* Merge topic 'autogen-system-include'Brad King2023-05-041-1/+25
|\ | | | | | | | | | | | | | | | | | | 7bf4e30090 Autogen: Default AUTOGEN_USE_SYSTEM_INCLUDE to ON if it is not set 033dc7ee2f Autogen: Add AUTOGEN_USE_SYSTEM_INCLUDE target property 8ba16db163 Tests/RunCMake: Add option for dynamic expected output Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8400
| * Autogen: Default AUTOGEN_USE_SYSTEM_INCLUDE to ON if it is not setOrkun Tokdemir2023-05-031-1/+12
| | | | | | | | Add policy CMP0151 to preserve the old behavior by default.
| * Autogen: Add AUTOGEN_USE_SYSTEM_INCLUDE target propertyOrkun Tokdemir2023-05-031-1/+14
| | | | | | | | | | | | | | `AUTOGEN_USE_SYSTEM_INCLUDE` was added. `AUTOGEN_USE_SYSTEM_INCLUDE` is a boolean property that can be set on a target to indicate that the autogen target include directory should be added as a system include directory or normal include directory to the target.
* | CMake code rely on cmList class for CMake lists management (part. 2)Marc Chevrier2023-04-291-2/+3
| |
* | cmList class: various enhancementsMarc Chevrier2023-04-291-3/+1
|/
* CMake code rely on cmList class for CMake lists management (part. 1)Marc Chevrier2023-04-241-9/+12
|
* Autogen: Add INTERFACE_AUTOMOC_MACRO_NAMES target propertyOrkun Tokdemir2023-04-091-0/+19
| | | | | | | | | | Add this target property to specify macro names that propagate to dependents as `AUTOMOC_MACRO_NAMES`. The dependents will automatically generate MOC files for source files that contain the inherited macro names. Co-Authored-By: Craig Scott <craig.scott@crascit.com> Fixes: #19679
* Autogen: Add target's C++ standard to moc_predef.hOrkun Tokdemir2023-03-301-1/+16
| | | | | | | | | Generate `moc_predef.h` using the same C++ standard level that will be used to compile the target so that the compiler's predefined macros can be more accurately recovered. Fixes: #24624 Qt-Issue: https://bugreports.qt.io/browse/QTBUG-110847
* Autogen: Restore AUTOGEN_PARALLEL support for numbersOrkun Tokdemir2023-03-201-0/+12
| | | | | | | | | Refactoring in commit d867e05892 (Autogen: Use JSON instead of CMake script for info files, 2019-09-20, v3.16.0-rc1~57^2) broke support for numerical values of `AUTOGEN_PARALLEL`. Parse and verify the range. Warn if the value is invalid. Fixes: #20376
* cmCustomCommand: Refactor custom command-specific policy valuesKyle Edwards2023-02-061-5/+0
| | | | | | | | | | | | | | | | | Many custom commands are created by CMake itself rather than by the user. These custom commands should always have their policies set to NEW, and user-created custom commands should have their policy values set only from the state snapshot. In addition, we want to genericize the mechanism of recording a policy at the time of custom command creation. Add a CM_FOR_EACH_CUSTOM_COMMAND_POLICY macro to genericize custom command policies. Use this to define all custom command policies. Make all such policies NEW instead of WARN by default. Remove individual policy modifier methods and add a single method that records relevant values from a cmStateSnapshot. Remove the no longer needed explicit policy settings from synthesized custom commands.
* Make vector operations more efficientRose2022-12-101-2/+1
|
* cmGeneratorExpression: Require cmake instanceKyle Edwards2022-11-111-1/+1
|
* AUTOMOC: Skip PCH when all sources files skip the PCH file tooCristian Adam2022-10-061-2/+20
| | | | Fixes: #23464
* cmQtAutoGenInitializer: Drop unnecessary argument in AppendProperty callBrad King2022-08-221-2/+1
| | | | Prepare to add another optional argument.
* AUTOUIC: Revert "Fix internal paths of generated ui_foo.h files"Brad King2022-07-221-16/+12
| | | | | | | | | Revert commit 10668f26c9 (AUTOUIC: Fix internal paths of generated ui_foo.h files, 2022-05-21, v3.24.0-rc3~20^2). It broke some existing projects that use more than one `.ui` file of the same name. Fixes: #23759 Issue: #23523
* Merge topic 'fix-23523' into release-3.24Brad King2022-06-291-12/+16
|\ | | | | | | | | | | | | | | 10668f26c9 AUTOUIC: Fix internal paths of generated ui_foo.h files Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7419
| * AUTOUIC: Fix internal paths of generated ui_foo.h filesJosiah Bills2022-06-281-12/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For every file foo.ui we generate a ui_foo.h file in ${target}_autogen/include or ${target}_autogen/include_$<CONFIG> in the multi-config case. Even .ui files in subdirectories are handled this way. That means, .ui files with the same base name will conflict in a target. However, for .ui files in subdirectories we added generated sources with the nonexistent path ${target}_autogen/include/subdir/ui_foo.h. This patch fixes that. Also, CMake will now yield an error if a target has multiple .ui files with the same base name. Fixes #23523
* | AutoMoc: Take AUTOMOC_BUILD_DIR into account in depfileJoerg Bornemann2022-05-251-1/+4
|/ | | | | | | | | | | | | | | | | For the Ninja generator and targets that have AUTOMOC_BUILD_DIR set, the AutoMoc target was always out of date. That was because the depfile in the AutoMoc build directory was referencing the wrong timestamp file: target_autogen/timestamp: ...dependencies... instead of automoc_build_dir/timestamp: ...dependencies... Use the relative path of the timestamp file as rule name for the depfile. That path is calculated with AUTOMOC_BUILD_DIR taken into account. Fixes: #23547
* LINK_LIBRARIES: Evaluate separately for linking and usage requirementsBrad King2022-03-221-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | We evaluate `LINK_LIBRARIES` and `INTERFACE_LINK_LIBRARIES` for two purposes: * Constructing the link line. * Collecting usage requirements. We evaluate `INTERFACE_LINK_LIBRARIES` separately for each purpose in order to support the `$<LINK_ONLY:...>` generator expression used to express private link dependencies of a static library. Previously we only evaluated `LINK_LIBRARIES` for linking, and used that result for collecting usage requirements too. Therefore `$<LINK_ONLY:...>` does not work in `LINK_LIBRARIES`. With the introduction of `INTERFACE_LINK_LIBRARIES_DIRECT`, evaluation of `LINK_LIBRARIES` now needs to distinguish these two cases in order to honor link dependencies encountered through `$<LINK_ONLY:...>` without also exposing other usage requirements through private dependencies of a static library. Revise internal infrastructure to distinguish the two cases when evaluating `LINK_LIBRARIES`. Make the information available in code paths for `INTERFACE_LINK_LIBRARIES_DIRECT` and `LINK_ONLY`. Defer actually using the information to later commits. Issue: #22496
* cmCustomCommand: Track main dependency explicitlyNAKAMURA Takumi2021-12-141-9/+3
| | | | | | | Store the main dependency as the first entry in the dependency list plus a boolean member indicating its existence. Note that this slightly changes existing behavior: the main dependency was previously the last entry of the dependency list.
* AutoMoc: Only add the WIN32 define if the target system is WindowsJoerg Bornemann2021-11-191-3/+3
| | | | | | | | | | | When there's no moc_predefs.h generated, we add the WIN32 define as fallback. Before this change, we added the WIN32 define if the host system was Windows. That's wrong when cross-compiling. Now we're checking whether the target system is Windows. Fixes: #22933
* cmLocalGenerator: Simplify Add{Custom,Utility}CommandNAKAMURA Takumi2021-11-181-36/+57
|
* cmCustomCommand: Move constructor arguments to individual settersNAKAMURA Takumi2021-11-181-5/+7
| | | | | | | | Make `cmCustomCommand` have just only default constructor. Use each setter instead. This follows the builder pattern. Introduce `cc::SetOutputs(std::string output)`. This will be used later, as substitution for `cc::SetOutputs({output})`.
* Merge topic 'autogen-dep-on-imported-implib-only-target'Brad King2021-09-271-1/+10
|\ | | | | | | | | | | | | | | | | 895fa3433f cmQtAutoGenInitializer: support IMPLIB-only imported targets 354c1f5628 Tests/RunCMake/Autogen: test CMP0111 behavior Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !6558
| * cmQtAutoGenInitializer: support IMPLIB-only imported targetsBen Boeckel2021-09-241-1/+10
| | | | | | | | | | | | | | Instead of using the target name directly (which ends up in the `Ninja` generators querying for the `LOCATION` parameter), wrap up the target name in a `$<TARGET_LINKER_FILE:>` to avoid the query for the unset property.
* | Rename cmProp in cmValueMarc Chevrier2021-09-211-6/+6
| |