summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Linker configuration: enhance usabilityMarc Chevrier2024-10-241-12/+18
| | | | | | | | | | The linker configuration file is now optional: It is loaded only if variable CMAKE_<LANG>_USE_LINKER_CONFIGURATION is set to TRUE. The file CMakeAddNewLanguage.txt is updated to take into account the linker configuration. Fixes: #26393
* Merge topic 'build-databases'Brad King2024-09-051-0/+228
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | e77655555c cmExperimental: gate build database support behind a flag 23cbeb5035 ci: enable `build_database` CXXModules tests 6863c1d823 Tests/CXXModules: add tests for module commands 123107c1a4 Tests/CXXModules: add support for running targets under a given config 438038b5e1 Tests/CXXModules: support building specific targets of example trees 84bc710d84 cmGlobalGenerator: generate build database files for targets 670f753f24 cmDyndepCollation: write build database metadata dcf9a66ffe cxxmodules: plumb control data for exporting build databases ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9708
| * cmExperimental: gate build database support behind a flagBen Boeckel2024-09-031-0/+5
| | | | | | | | | | Given that the feature currently only supports C++ sources and is not formally accepted by ISO yet, gate it behind a flag.
| * cmGlobalGenerator: generate build database files for targetsBen Boeckel2024-08-271-0/+216
| |
| * cmMakefile: support "after generator target" generator actionsBen Boeckel2024-08-271-0/+7
| | | | | | | | | | These actions may require additional information gathered during generation. Run them at the appropriate time.
* | Source: Avoid comparing pointers to nullptrVitaly Stakhovsky2024-08-271-1/+1
|/
* Linker configuration: introduce a new architectureMarc Chevrier2024-07-201-0/+19
| | | | | | | | A new set of files are dedicated to linker configuration. This set of files enable a fine-tuned configuration based of the linker type as identified during compiler detection. Fixes: #25360
* Install: Add parallel installation optionMartin Duffy2024-07-151-0/+36
| | | | Fixes: #26000
* add_custom_command: Add CODEGEN supportJuan Ramos2024-07-011-0/+49
| | | | | | | | | | | By specifying CODEGEN as an argument to add_custom_command the custom command will be added to a codegen build target. The intent is to provide a convenient way for users to get their generated files without having to build the whole project. This can be helpful for code analysis tools which can be useful for IDEs and CI.
* Merge topic 'ninja-parallel'Brad King2024-05-241-1/+3
|\ | | | | | | | | | | | | | | 0e5250e63c Ninja: Add option for parallel install daeb8fffa2 Help: Add Builtin Targets section to Ninja help Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9505
| * Ninja: Add option for parallel installMartin Duffy2024-05-231-1/+3
| | | | | | | | | | | | | | Adds the global property ``INSTALL_PARALLEL`` to enable a parallel install target for Ninja. Fixes: #25459
* | Merge topic 'cmp0037-message'Brad King2024-05-151-3/+5
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | c773d5b436 CMP0037: Restore diagnostic message for invalid ALIAS target names Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !9519
| * | CMP0037: Restore diagnostic message for invalid ALIAS target namesBrad King2024-05-141-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Refactoring in commit 7a4c02cb38 (cmGlobalGenerator: factor out messaging for CMP0037, 2023-09-24, v3.28.0-rc1~39^2~7) incorrectly switched to reporting the aliased target name instead of the invalid name of the alias itself. Fixes: #25979
* | | cmake: Capture more complete configure/generate steps in printed durationsBrad King2024-05-101-29/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Extend the start/end times from commit 5f0c5ec49b (cmake: Print configure/generate time, 2023-01-17, v3.26.0-rc1~67^2) to capture generator-specific Configure/Generate actions, and the time spent in the internal "Compute" step at the start of generation. Fixes: #25482
* | | cxxmodules: link to `std`-providing targets when availableBen Boeckel2024-04-111-0/+23
| | |
* | | cmGlobalGenerator: compute target features before synthetic targetsBen Boeckel2024-04-111-10/+16
| | | | | | | | | | | | | | | | | | | | | For `import std;` support, CMake needs to know the standard library involved in order to ensure that the right target is linked. Afterwards, the created synthetic targets need their target compile features computed.
* | | Merge topic 'compiler-path-normalization'Brad King2024-04-111-8/+6
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | 26e79ed299 Fix regression on reconfigure with unnormalized -DCMAKE_<LANG>_COMPILER= 1d485a8b45 Tests/RunCMake/CompilerChange: Simplify test cases Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Acked-by: Ashay Rane <ashay.r@gmail.com> Merge-request: !9416
| * | Fix regression on reconfigure with unnormalized -DCMAKE_<LANG>_COMPILER=Brad King2024-04-101-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 3f2a5971c0 (Modules: CMAKE_*_COMPILER convert path to cmake path, 2023-12-02, v3.29.0-rc1~292^2) we normalize the path to the compiler. Update our logic that checks whether the compiler has changed to account for path normalization. Fixes: #25883 Issue: #25456
| * | Merge topic 'restore-link-interface-objlib-with-unity' into release-3.29Brad King2024-02-221-0/+4
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | 5b8e9e068f Restore support for TARGET_OBJECTS in link interfaces with unity builds 1313c78a9c Tests: Update RunCMake.TargetObjects cmake_minimum_required version Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !9279
* | | Source: Use cmValue::IsOn and IsOffVitaly Stakhovsky2024-03-171-9/+9
| | | | | | | | | | | | Speed up a bit by calling members directly.
* | | Merge topic 'restore-link-interface-objlib-with-unity'Brad King2024-02-221-0/+4
|\ \ \ | |/ / |/| / | |/ | | | | | | | | | | 5b8e9e068f Restore support for TARGET_OBJECTS in link interfaces with unity builds 1313c78a9c Tests: Update RunCMake.TargetObjects cmake_minimum_required version Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !9279
| * Restore support for TARGET_OBJECTS in link interfaces with unity buildsBrad King2024-02-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | This was broken by commit df08c37a42 (cmGlobalGenerator: Add unity/pch sources after computing compile features, 2024-02-02, v3.28.3~1^2~1^2), and 3.28.2's commit 76b5383123 (cmGlobalGenerator: add unity sources after computing target compile features, 2024-01-01, v3.28.2~17^2~1). The problem is very similar to that fixed by commit 4e8f24e977 (PCH: Clear link interface cache when adding PCH object to it, 2022-01-24, v3.23.0-rc1~44^2~9). Generalize that fix. Fixes: #25696
* | Merge topic 'restore-pch-with-unity'Brad King2024-02-051-29/+11
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | 30829da506 Unity: Clarify source comments on unity build transformation 87bf1c6c33 Merge branch 'unity-after-compile-features' into restore-pch-with-unity df08c37a42 cmGlobalGenerator: Add unity/pch sources after computing compile features 004c3c3986 Tests: Add case covering PCH in a unity build Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Acked-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !9215
| * Unity: Clarify source comments on unity build transformationBrad King2024-02-021-1/+2
| |
| * cmGlobalGenerator: Add unity/pch sources after computing compile featuresBrad King2024-02-021-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sources that will be scanned for C++ module dependencies need to be excluded from unity builds. We need to compute compile features in order to know which sources will be scanned. Unity build and PCH sources can be added afterward without changing the compile features. This re-implements commit 76b5383123 (cmGlobalGenerator: add unity sources after computing target compile features, 2024-01-01, v3.28.2~17^2~1) using a simpler approach that also preserves support for PCH with Unity builds. Issue: #25650 Co-authored-by: Ben Boeckel <ben.boeckel@kitware.com>
* | Merge topic 'cxxmodules-no-unity'Brad King2024-01-101-1/+29
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 63bbb3768d cmLocalGenerator: ignore scanned sources for unity builds 76b5383123 cmGlobalGenerator: add unity sources after computing target compile features 7fc2a83fe6 Tests/CXXModules: add a test with unity build support Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !9118
| * | cmGlobalGenerator: add unity sources after computing target compile featuresBen Boeckel2024-01-051-1/+29
| |/ | | | | | | | | | | We need to know which sources will be scanned for C++ module dependencies in order to exclude them from unity builds. The addition of unity sources will not change the set of features.
* | cmGlobalGenerator: Allow passing language to GetLangaugeOutputExtensionEvan Wilde2023-12-051-13/+19
| | | | | | | | | | | | | | | | | | | | The original GetLanguageOutputExtension took a sourcefile instead of the name of the language itself. This implementation provided a convenient handler for when the SourceFile doesn't know what language it is, but there are times where we know the language, but don't necessarily have a source file. Adding an overload that takes the name of the language and returns the extension of that language, or empty string if no extension is registered.
* | Merge topic 'ccmake-install-rds-crash'Brad King2023-11-301-0/+2
|\ \ | |/ | | | | | | | | | | d01120a47a cmGlobalGenerator: clear RuntimeDependencySet members at configure Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9013
| * cmGlobalGenerator: clear RuntimeDependencySet members at configureBen Boeckel2023-11-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit f2617cf8e6 (Source: Add cmInstallRuntimeDependencySet, 2021-05-19) introduced via !6186 to 3.21 added storage to the global generator for runtime dependency sets. However, this was not cleared at the start of configure in the `ClearGeneratorMembers()` method. When using `ccmake` to configure (and, presumably `cmake-gui` too), projects using `install(TARGETS … RUNTIME_DEPENDENCY_SET)` would use dependency set tracking instances from previous configure runs that held references to targets free'd with the `cmMakefile` instance that held them. Clear the dependency sets at the beginning of configure so that they are not remembered and trigger via use-after-free bugs when used. Fixes: #25446
* | Merge branch 'backport-ci-fedora-39' into ci-fedora-39Brad King2023-11-171-2/+2
|\ \ | |/
| * codespell: Fix typosBrad King2023-11-171-2/+2
| |
* | Optionally make `test` target depend on `all`William Sciaroni2023-11-101-0/+8
| | | | | | | | Fixes: #8774
* | cmGlobalGenerator: hint about missing extensions on WindowsBen Boeckel2023-10-241-1/+5
| | | | | | | | | | | | Discussed on Discourse: https://discourse.cmake.org/t/cross-compiling-from-a-windows-host-targeting-raspbian-32-bits-arm/9250
* | CMAKE_PROJECT_INCLUDE: Allow to run module filesCristian Le2023-10-181-1/+16
|/ | | | Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
* cmGlobalGenerator: factor out messaging for CMP0037Ben Boeckel2023-09-251-9/+14
| | | | Also make some strings into character literals.
* cmGlobalGenerator: use static string views for reserved targetsBen Boeckel2023-09-251-4/+5
| | | | Also make the array static.
* cxxmodules: generate synthetic targets as an initial passBen Boeckel2023-08-171-0/+40
| | | | | | We need to be able to construct BMIs that will be usable from the client modules for the target importing the module, so create BMI-only compilation rules for `IMPORTED` targets to create these BMIs.
* cmGlobalGenerator: always support generating rule hashesBen Boeckel2023-08-081-8/+1
|
* IWYU: Update for Debian 12 CI jobBrad King2023-07-281-0/+3
| | | | | | `include-what-you-use` diagnostics, in practice, are specific to the environment's compiler and standard library. Update includes to satisfy IWYU for our CI job under Debian 12.
* cmGlobalGenerator: use single chars where possibleBen Boeckel2023-07-191-1/+1
|
* cmGlobalGenerator: use `cmStrCat` where possibleBen Boeckel2023-07-191-39/+42
|
* cmGlobalGenerator: Remove unused windows.h includeClemens Wasser2023-06-221-4/+0
|
* codecvt: Extrace codecvt::Encoding to remove codecvt includesClemens Wasser2023-06-221-0/+4
|
* cxxmodules: remove `CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP` variableBen Boeckel2023-06-011-15/+0
| | | | It is now subsumed by the UUID setting completely.
* Merge topic 'cmake-compile-no-warning-as-error'Brad King2023-06-011-0/+6
|\ | | | | | | | | | | | | | | | | da27ff1e96 Preserve --compile-no-warning-as-error in automatic CMake re-runs e0b48284a1 Xcode: Internally uses -S instead of -H to specify source directory Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !8522
| * Preserve --compile-no-warning-as-error in automatic CMake re-runsBrad King2023-05-301-0/+6
| | | | | | | | | | | | | | | | When the build system re-runs `cmake` to regenerate itself, preserve the `--compile-no-warning-as-error` option if it was used when `cmake` was last explicitly invoked. Normally such settings are preserved in the cache, but the purpose of this option is to be beyond the reach of project code.
* | Merge topic 'AddCacheEntry-suppress-raw-pointer-usage'Brad King2023-05-311-5/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | 4fc322bab4 AddCacheEntry: Suppress raw pointer usage Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8520
| * | AddCacheEntry: Suppress raw pointer usageMarc Chevrier2023-05-301-5/+3
| |/
* | Merge topic 'cmake-verbose-print-build-tool-command'Brad King2023-05-311-25/+51
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | 8451a3f0b5 cmGlobalGenerator: use a stream for output in `Build` e060666531 cmake: write the build command itself with `--verbose` b017c9f127 cmGlobalGenerator: fix off-by-one for `&&` command joining c715fd8d76 cmGlobalGenerator: quote commands in `::Build` output d6c0e827bc cmGlobalGenerator: add a `QuotedPrintable` method for commands 28ee3bef34 cmGlobalGenerator: add missing spaces in output 465ab8d872 cmGlobalGenerator: use `cmStrCat` in `::Build` 81d45dabc4 cmOutputConverter: add a `static` version of `EscapeForShell` Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Acked-by: Alex <leha-bot@yandex.ru> Merge-request: !8183