summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Source: Simplify hasher object constructionBrad King2024-01-181-3/+3
|
* Xcode: Restore support for standalone IMPORTED_LOCATION_<CONFIG>Marc Chevrier2023-12-181-5/+17
| | | | | | | | | | | In commit 878ae03832 (macOS: IMPORTED framework: Honor SYSTEM target property in all cases, 2023-08-27, v3.28.0-rc1~162^2) we broke support for `IMPORTED_LOCATION_<CONFIG>` without `IMPORTED_CONFIGURATIONS`. Previously it worked if the importing project's configurations match the set of `IMPORTED_LOCATION_<CONFIG>` properties set. Fix that case. Fixes: #25506 Issue: #25515
* cmGeneratorTarget: disable C++ module scanning for verify targetsBen Boeckel2023-12-111-0/+1
|
* cmGeneratorTarget: Add helper to check for known runtime artifactBrad King2023-12-051-0/+13
|
* cxxmodules: Add more suggestions to no-modules-support diagnosticsBrad King2023-11-281-7/+12
| | | | | | Tell users what generators *do* support C++ modules. Report the current generator to make clear it is not one of those supporting modules. Also clarify the purpose of the existing documentation references.
* LinkItem: track `cmSourceFile` instances for external objectsBen Boeckel2023-11-231-0/+2
| | | | | The target may be required in order to provide Fortran modules, so track the source file so that the target may be looked up when needed.
* cmGeneratorTarget: also check included objects for Fortran modulesBen Boeckel2023-11-211-9/+37
| | | | | Fortran modules provided by objects in `$<TARGET_OBJECTS>` should also count as "has Fortran modules" for the target referencing the objects.
* cmGeneratorTarget: add a query for targets with objects in the source listBen Boeckel2023-11-211-9/+18
| | | | | | This will be eventually be used to inform the collator of this information so that Fortran modules provided by the resulting objects can also be used as intended.
* cmGeneratorTarget: use pointers to `const` generator targets for languagesBen Boeckel2023-11-211-2/+2
|
* cmGeneratorTarget: track object libraries using a `set`Ben Boeckel2023-11-211-10/+4
| | | | | | This avoids having to do manual "is already present" checks. The order the targets are processed does not need to be preserved because the resulting `languages` result is already a `set`.
* codespell: Fix typosBrad King2023-11-171-4/+4
|
* cmGlobalGenerator: give context about module queriesBen Boeckel2023-11-011-3/+6
| | | | | | Some queries are merely investigating support in order to change behavior. Let the method know so that any internal errors can be skipped over.
* CMP0155: ignore scanning for sources if no scanner is availableBen Boeckel2023-11-011-2/+8
| | | | | | | | | | This allows for a more graceful transition for projects using C++20 without scanner support (e.g., Clang 15 or GCC 13). While newer compilers will (needlessly) scan, it allows C++20-using projects to use older compilers without having to set `CMAKE_CXX_SCAN_FOR_MODULES` to support newer CMake minimum versions. Fixes: #25357
* cxxmodules: Reference documentation in no-modules-support diagnosticsBrad King2023-10-111-9/+11
| | | | | | Help users avoid errors about module support when they may not need it. While at it, polish sentence syntax in the diagnostic messages.
* cxxmodules: Scan only targets that explicitly enable C++ 20Brad King2023-10-051-7/+5
| | | | | | Previously we scanned any targets for which C++ 20 is enabled, even if enabled only by the compiler's default, such as when `CXXFLAGS=-std=c++20`.
* cmGeneratorTarget: Track explicitly enabled language standard levelsBrad King2023-10-051-1/+39
| | | | | Previously we only tracked when an explicit setting requires the standard level to be higher than the compiler's default.
* cmGeneratorTarget: Remove outdated const/mutable pairBrad King2023-10-041-2/+2
|
* cmStandardLevelResolver: Report feature std level from GetNewRequiredStandardBrad King2023-10-041-1/+3
| | | | | Regardless of whether the feature requires a new (higher) standard level, always report the standard level that the feature needs.
* cxxmodules: Fix CMP0155 NEW behavior when C++ compile features are not knownBrad King2023-10-031-11/+18
| | | | | | | | | | | | | | | | | With CMP0155 NEW behavior, we scan C++ sources in targets using C++ 20, i.e., in which the `cxx_std_20` feature is available. However, our check for C++ feature availability may incorrectly succeed in two cases: * MSVC versions from VS 2013 do not model C++ standard levels, so we assume all features are available as a heuristic to let projects at least try compiling with them. * During ABI detection the `CMAKE_CXX20_COMPILE_FEATURES` variable is not populated so we assume all features are available, knowing that our ABI detection project does not need them. For purposes of detecting targets using C++ 20, we do not want to assume `cxx_std_20` is available, so verify that we really know it is.
* cxxmodules: scan C++ sources for imports by defaultBen Boeckel2023-10-021-1/+16
| | | | | Existing projects are not using C++ modules in their sources, so introduce policy CMP0155 to enable scanning by default.
* cmGeneratorTarget: use `this->` for method callsBen Boeckel2023-10-021-2/+2
|
* cxxmodules: rework control logic for scanning regular C++ sourcesBen Boeckel2023-10-021-31/+91
| | | | | | | | | | | Now that scanning support is no longer experimental, the logic for whether or not to scan C++ 20 sources is now important because all projects are now exposted to the logic. Make the scanning rules explicit in the documentation and rework the queries to localize all of the associated logic. A policy to handle the ultimate fallback logic will be implemented in a following commit.
* cmExperimental: remove the flag for C++ modulesBen Boeckel2023-10-021-11/+5
| | | | | | | All the major compilers now have scheduled releases with support for scanning, so remove the experimental gate. Fixes: #18355
* Merge topic 'cxxmodules-export-dirs-with-prefix'Brad King2023-09-271-2/+1
|\ | | | | | | | | | | | | | | | | | | | | | | 42654cc818 Tests/CXXModules: add tests for modules with include requirements 7217cb78cf Tests/CXXModules: relax line number matching in stderr b3d1bbbbcc cmExportFileGenerator: relocate include directories for C++ modules 349ff8b080 cmGeneratorTarget: remove not-INTERFACE assertion 681a763425 cmGeneratorTarget: use a character literal Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8838
| * cmGeneratorTarget: remove not-INTERFACE assertionBen Boeckel2023-09-261-1/+0
| | | | | | | | | | | | | | IMPORTED INTERFACE targets which provide C++ modules may have include directories that need checked for whether they are system directories or not. These directories are intended for the module compilation themselves (which may include headers that module consumers do not need).
| * cmGeneratorTarget: use a character literalBen Boeckel2023-09-261-1/+1
| |
* | cmGeneratorTarget: use `GetSupportDirectory` in PCH codepathsBen Boeckel2023-09-251-8/+2
|/ | | | | Instead of recalculating the support directory path, use the intended method.
* HIP: Add support for NVIDIA GPUsBrad King2023-09-211-2/+9
| | | | | | Add support for using the CUDA Toolkit's NVCC to compile HIP code. Fixes: #25143
* CUDA: Factor out helper to generate CUDA architecture flagsBrad King2023-09-211-20/+33
| | | | Prepare to use it for other languages.
* cmGeneratorTarget: Clarify local variable names for device architecturesBrad King2023-09-191-21/+20
|
* Merge branch 'fortran-object-libraries-release' into fortran-object-librariesBen Boeckel2023-09-051-0/+9
|\ | | | | | | | | | | * fortran-object-libraries-release: cmComputeLinkInformation: compute link info for module-using targets cmGeneratorTarget: support config-independent Fortran source queries
| * cmGeneratorTarget: support config-independent Fortran source queriesBen Boeckel2023-09-051-0/+9
| | | | | | | | | | Some locations care about "any config with Fortran", so make a query for such (they may not know any configuration names themselves).
* | macOS: IMPORTED framework: Honor SYSTEM target property in all casesMarc Chevrier2023-08-271-3/+3
| | | | | | | | When IMPORTED_LOCATION holds a framework folder, SYSTEM property must be respected.
* | Merge topic 'modules-better-messages'Brad King2023-08-251-11/+20
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 571b5e1f2c cxxmodules: improve error messages for C++ module setup 8b4d32c18b cmStandardLevelResolver: add query for the effective standard level 17ddc4ac76 cmStandardLevelResolver: compare with static string literals 6f1dae2b01 cmStandardLevelResolver: use `cmStrCat` where possible 0d45d40e13 cmStandardLevelResolver: use character literals where possible Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !8755
| * | cxxmodules: improve error messages for C++ module setupBen Boeckel2023-08-231-11/+20
| |/ | | | | | | | | | | | | Make it clear that: - the quoted string is a target name; and - C++ sources that export modules is the important detail.
* | cxxmodules: generate synthetic targets as an initial passBen Boeckel2023-08-171-1/+103
| | | | | | | | | | | | 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.
* | cmGeneratorTarget: classify BMI-only C++ module sourcesBen Boeckel2023-08-171-0/+10
| |
* | cmGeneratorTarget: support better errors when checking for C++20 modulesBen Boeckel2023-08-161-16/+20
| | | | | | | | | | Some callers have their own error reporting mechanisms which give more context. Support handing off the error string for these use cases.
* | OPTIMIZE_DEPENDENCIES: Skip order-only deps for non-linking targetsCraig Scott2023-08-091-0/+5
| | | | | | | | Fixes: #21517
* | cmComputeLinkInformation: prepare Item consumers for `OBJECT` librariesBen Boeckel2023-08-011-1/+1
| | | | | | | | | | | | | | | | After b665966933 (cmComputeLinkInformation: track `OBJECT` library dependencies, 2023-07-22), introduced in !8645 as a fix for #25112, `OBJECT` libraries were tracked in a separate member to reduce the risk of further regressions. This commit prepares consumers to handle `OBJECT` libraries once they start appearing as link items.
* | IWYU: Update for Debian 12 CI jobBrad King2023-07-281-0/+1
| | | | | | | | | | | | `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.
* | macOS: Add support for linking against .xcframework foldersKyle Edwards2023-07-261-0/+41
| | | | | | | | Issue: #21752
* | Merge topic 'imported-target-framework-path'Brad King2023-06-261-1/+12
|\ \ | | | | | | | | | | | | | | | | | | | | | d605f728f7 macOS: Allow IMPORTED_LOCATION to be a framework folder Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !8586
| * | macOS: Allow IMPORTED_LOCATION to be a framework folderKyle Edwards2023-06-231-1/+12
| |/ | | | | | | Issue: #24946
* | Merge topic 'build-pch'Brad King2023-06-231-2/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | aba5bab62e ci: Add nightly job to build CMake with PCH on macOS 44f08e94ff ci: Add nightly job to build CMake with PCH on Windows e0eb97e923 libuv: Precompile common expensive headers e2efa89c7f cmcppdap: Precompile common expensive headers 9d7921d388 liblzma: Precompile common expensive headers 6aaefdb3be libarchive: Precompile common expensive headers a8d91e2719 curl: Precompile common expensive headers 59277bccd3 bzip: Precompile common expensive headers ... Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8571
| * | C{Make,Test}Lib: Precompile common expensive headersClemens Wasser2023-06-221-2/+2
| |/
* | cmList: Add container conversion to stringMarc Chevrier2023-06-221-3/+2
|/
* VERIFY_INTERFACE_HEADER_SETS: Skip header files that have SKIP_LINTINGKyle Edwards2023-06-061-0/+4
| | | | Fixes: #24972
* cxxmodules: remove `CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP` variableBen Boeckel2023-06-011-1/+3
| | | | It is now subsumed by the UUID setting completely.
* Merge topic 'remove-header-unit-fileset-type'Brad King2023-06-011-19/+6
|\ | | | | | | | | | | | | | | | | 7b62a83c6f cxxmodules: update the experimental UUID 6ff5cdc533 cxxmodules: remove support for `CXX_MODULE_HEADER_UNITS` filesets Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8510