summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* 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
| * 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
| * cmGlobalGenerator: use a stream for output in `Build`Ben Boeckel2023-05-271-21/+29
| | | | | | | | | | This allows output to show up in output immediately instead of being batched.
| * cmGlobalGenerator: fix off-by-one for `&&` command joiningBen Boeckel2023-05-161-1/+1
| | | | | | | | Only add `&&` if there is another command after the current one.
| * cmGlobalGenerator: quote commands in `::Build` outputBen Boeckel2023-05-161-4/+7
| | | | | | | | | | Now that these are going to be visible when running with `--verbose`, properly quote things so that they can be used as-is.
| * cmGlobalGenerator: add a `QuotedPrintable` method for commandsBen Boeckel2023-05-161-0/+18
| |
| * cmGlobalGenerator: add missing spaces in outputBen Boeckel2023-05-161-3/+3
| | | | | | | | | | The preludes to commands should have a space to separate them from the first argument of the command sequence.
| * cmGlobalGenerator: use `cmStrCat` in `::Build`Ben Boeckel2023-05-161-13/+10
| | | | | | | | Also replace some single-char strings with character literals.
* | SetProperty: suppress raw pointer usageMarc Chevrier2023-05-261-1/+1
| |
* | Apple Framework: enhance path parsingMarc Chevrier2023-05-211-5/+6
|/
* CMake code rely on cmList class for CMake lists management (part. 2)Marc Chevrier2023-04-291-21/+17
|
* CMake code rely on cmList class for CMake lists management (part. 1)Marc Chevrier2023-04-241-7/+7
|
* Autogen: Defer setup until Generate stepOrkun Tokdemir2023-04-051-8/+14
| | | | It is better to set variables up once all target dependencies are known.
* Merge topic 'automoc-cxx-standard'Brad King2023-03-311-12/+10
|\ | | | | | | | | | | | | | | 429a452705 Autogen: Add target's C++ standard to moc_predef.h 21f812e57c Autogen: Split creation and setup of custom targets into separate steps Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8359
| * Autogen: Split creation and setup of custom targets into separate stepsOrkun Tokdemir2023-03-241-12/+10
| | | | | | | | | | | | | | Defer the setup step until after compile features have been finalized on normal targets. Later this will help pass the information to Qt tools. Issue: #24624
* | macOS: Do not pass Apple-specific flags to llvm-stripBrad King2023-03-291-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit cf82300a63 (BinUtils: Clarify search logic and make it more consistent, 2021-05-27, v3.21.0-rc1~119^2~2) we prefer `llvm-strip` over `strip` when using Clang. However, since commit 20291e8e72 (install: Fix stripping on macOS, 2019-01-30, v3.14.0-rc1~31^2) on macOS we add flags `-u -r`, needed by Apple's `strip` for executables, but that `llvm-strip` does not need or support. Improve the condition to add Apple-specific flags only when the selected `strip` tool is Apple's. Note that Apple dylibs must be stripped with `-x` with either Apple's `strip` or `llvm-strip`. Fixes: #24601
* | Merge topic 'module-depends-static-lib-cycle'Brad King2023-03-271-2/+7
|\ \ | |/ |/| | | | | | | | | | | | | 01d7860fdb Ninja,Makefile: Restore Fortran module scanning in static library cycle 846baa7c5b cmGlobalGenerator: Factor out helper to check target ordering Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8363
| * cmGlobalGenerator: Factor out helper to check target orderingBrad King2023-03-241-2/+7
| |
* | cmMakefile: Store recursion depth limit as size_tBrad King2023-03-131-2/+0
| |
* | Deprecate "extra" generators in favor of cmake-file-api(7)Brad King2023-02-151-0/+10
| | | | | | | | | | | | | | | | | | | | | | The "extra" generators were created in CMake's early years to provide support for users of specific IDEs by directly generating their project files alongside make or ninja files. Nowadays the file-api provides a more generic, maintainable, well-tested, and robust way for IDEs to view CMake project build trees. Deprecate the legacy "extra" generators to encourage the corresponding IDEs to use the file-api. Fixes: #19090
* | cmGlobalGenerator: Avoid referencing CMAKE_CFG_INTDIRKyle Edwards2023-02-031-1/+1
|/