summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.h
Commit message (Collapse)AuthorAgeFilesLines
* cmGeneratorTarget: Simplify ComputeVersionedName signatureBrad King2024-10-101-3/+5
|
* Merge topic 'genex-tco-subgraph'Brad King2024-09-111-0/+12
|\ | | | | | | | | | | | | | | | | 4a11772618 GenEx: Limit TARGET_PROPERTY transitive closure optimization to subgraphs Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Acked-by: Robert Maynard <robertjmaynard@gmail.com> Merge-request: !9789
| * GenEx: Limit TARGET_PROPERTY transitive closure optimization to subgraphsMichael Herwig2024-09-101-0/+12
| | | | | | | | Fixes: #25728
* | cmDyndepCollation: write build database metadataBen Boeckel2024-08-271-0/+3
| | | | | | | | Generators will hook this up into the build graph as needed.
* | cmGeneratorTarget: add a method to build classified command linesBen Boeckel2024-08-271-0/+59
| | | | | | | | | | | | This is essentially an extraction of the `Ninja` generator's command line building logic. Porting generators to reuse this construction is a task for the future.
* | cmGeneratorTarget: add the concept of a "family" nameBen Boeckel2024-08-271-0/+1
|/ | | | | With synthetic targets, a name which is the same between all synthetic targets which share a base target is warranted.
* GeneratorTarget: Factor out AddSystemIncludeCacheKey()Orkun Tokdemir2024-07-221-0/+4
|
* Merge topic 'aix-archive-shared-libraries'Brad King2024-07-191-0/+3
|\ | | | | | | | | | | | | | | | | d27fe9dfba AIX: Add option to archive shared libraries 98013ad1ca cmXCOFF: Add support for editing binary inside an archive Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !9606
| * AIX: Add option to archive shared librariesAditya Vidyadhar Kamath2024-07-171-0/+3
| | | | | | | | | | | | | | | | Add option `CMAKE_AIX_SHARED_LIBRARY_ARCHIVE`. There will no versions for the shared objects when this option is used. Closes: #26033
* | Restore support for exporting INTERFACE with missing dependenciesBrad King2024-07-151-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit c16acd35b3 (GenEx: Add support for custom transitive link properties, 2024-05-09, v3.30.0-rc1~82^2) evaluation of `TRANSITIVE_LINK_PROPERTIES` by `install(EXPORT)` enables discovery of missing dependencies on INTERFACE libraries that we did not previously diagnose. This regressed existing projects that relied on such non-diagnosis. Although commit 2fc9e482a9 (Evaluation of TRANSITIVE_LINK_PROPERTIES isn't considered a usage, 2024-07-05) fixed this, it also made a significant change to the `UseTo` infrastructure that may have other subtle effects. Replace the fix with an approach that explicitly models suppression of the relevant diagnostics. Fixes: #26108
* | Evaluation of TRANSITIVE_LINK_PROPERTIES isn't considered a usageRobert Maynard2024-07-051-0/+1
|/ | | | Fixes #26108
* Swift: Use per-config module file locations in multi-config generatorsDave Abrahams2024-05-241-6/+6
| | | | | | | | | | | | | | | | Place `.swiftmodule` files a subdirectory named after the configuration. Fixes: #25864 Fixes: #25997 - Swift/RunCMakeTest.cmake: - CMP0157-OLD was enabled for Xcode, where it works. - A test was added that verifies .swiftmodule's are generated into separate directories with multi-config generators. - Tests/SwiftOnly/CMakeLists.txt: tests were added that validate that cross-subdirectory module dependencies (via target_link_libraries) work.
* cmGeneratorTarget: Adopt Swift-related methods from the Ninja generatorDave Abrahams2024-05-241-0/+20
| | | | | They will see more use as Swift bugs are fixed in the Ninja Multi-Config generator.
* GenEx: Add support for custom transitive compile propertiesBrad King2024-05-211-1/+37
| | | | | | | | | Teach the `$<TARGET_PROPERTY:...>` generator expression to check for a new `TRANSITIVE_COMPILE_PROPERTIES` property in the target's link closure to enable transitive evaluation of named properties through the link closure, excluding entries guarded by `$<LINK_ONLY:...>`. Issue: #20416
* cmGeneratorTarget: Add GetLinkImplementationClosure mode for linkingBrad King2024-05-211-2/+3
| | | | | | Previously this method always returned the closure for compile-only usage requirements. Add an option to get the closure for linking, which pierces `$<LINK_ONLY>`.
* cmGeneratorTarget: Add TransitiveProperty constructor to help some compilersBrad King2024-05-211-0/+7
| | | | | | | | Some compilers have trouble initializing TransitiveProperty as a parent class using an initializer list unless there is an explicit constructor: * SunPro fails to compile * XLClang seems to miscompile, exhibiting strange runtime behavior
* cmGeneratorTarget: Factor link interface/impl methods into own sourceBrad King2024-05-201-1/+1
|
* cmGeneratorTarget: Move TargetPropertyEntry creation method to headerBrad King2024-05-201-0/+10
|
* cmGeneratorTarget: Clarify enum for specifying purpose of usage requirementsBrad King2024-05-031-17/+15
| | | | | | | | Since commit 1e49880472 (cmGeneratorTarget: Avoid boolean trap in usage requirement lookup, 2021-12-08, v3.23.0-rc1~245^2) we have clarified the distinction between compile-only and link-only usage requirements. Rename the `LinkInterfaceFor` enum to `UseTo` to clarify that its role is to specify the purpose of usage requirements.
* cmGeneratorTarget: Clarify name for evaluating compile-only usage requirementsBrad King2024-05-031-2/+2
|
* Merge topic 'pch-single-arch'Brad King2024-05-021-0/+2
|\ | | | | | | | | | | | | | | | | ef006ebd9b PCH: Use per-arch .pch files only when building multiple Apple architectures 99bfb430ee cmNinjaTargetGenerator: Remove unused Apple architecture list Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !9483
| * PCH: Use per-arch .pch files only when building multiple Apple architecturesBrad King2024-05-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | Since commit f593b354da (PCH: Add support for multi architecture iOS projects, 2020-04-02, v3.18.0-rc1~414^2) we use per-arch .pch files even when compiling for just the host architecture on macOS arm64. This breaks with compilers that do not support `-Xarch_` flags, such as GCC. Avoid using per-arch .pch files in single-architecture builds. Fixes: #25514 Issue: #20497
* | Merge topic 'vs-scan-module-deps-settings'Brad King2024-05-021-0/+7
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 3022f0363f VS: set ScanSourceForModuleDependencies at vcxproj level dff511ad28 cmGeneratorTarget: add a target-level query for "needs dyndep" Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: AaronRuizMoraUK <aaronruizmora@gmail.com> Merge-request: !9471
| * | cmGeneratorTarget: add a target-level query for "needs dyndep"Ben Boeckel2024-05-011-0/+7
| | | | | | | | | | | | | | | This can still be overridden per-source, but it indicates the state of the target's default behavior.
* | | Merge topic 'genex-link-properties'Brad King2024-05-011-0/+13
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ddb9442f48 GenEx: Fix TARGET_PROPERTY evaluation of transitive link properties 862b8e28ad GenEx: Teach TARGET_PROPERTY evaluation to optionally pierce LINK_ONLY 8d1d6a1437 Tests: Cover TARGET_PROPERTY genex evaluation of transitive link properties abf607c2ec Tests: Cover TARGET_PROPERTY genex evaluation of transitive build properties 7d3d728a72 Help: Clarify CMP0099 documentation and summary text 79a3ae9a0d cmGeneratorExpressionDAGChecker: Simplify transitive property table e8010b67c7 cmGeneratorExpressionDAGChecker: Make local generator available in constructor b36fb3f6f1 cmGeneratorExpressionNode: Remove outdated lint suppression Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !9473
| * | GenEx: Teach TARGET_PROPERTY evaluation to optionally pierce LINK_ONLYBrad King2024-04-291-0/+1
| | |
| * | cmGeneratorExpressionDAGChecker: Simplify transitive property tableBrad King2024-04-291-0/+12
| | | | | | | | | | | | | | | Refactor the table of builtin transitive properties to avoid preprocessor-generated cascading-if blocks with duplicate code.
* | | Merge topic 'export-name-safe-name'Brad King2024-05-011-0/+1
|\ \ \ | |/ / |/| / | |/ | | | | | | | | | | 142a85f9c1 cxxmodules: use filesystem-safe export names in filenames 4452d41488 cmGeneratorTarget: add method to get a filesystem-safe export name Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !9474
| * cmGeneratorTarget: add method to get a filesystem-safe export nameBen Boeckel2024-04-291-0/+1
| | | | | | | | | | | | | | | | C++ module support puts the export name in a filename. Export names with `:` in them are not valid filenames on Windows. Add a method to escape names as necessary. See: #25828
* | Merge topic 'genex-cleanup'Brad King2024-04-151-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 895efd4e7a cmGeneratorExpression: Consolidate recognition of transitive properties 5f7d8192da cmGeneratorExpression: Inline evaluation helper at only call site 91a25de520 cmGeneratorExpression: Add comments on implementation details 0a61116f52 cmGeneratorTarget: Remove EvaluateInterfaceProperty argument default Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !9425
| * | cmGeneratorTarget: Remove EvaluateInterfaceProperty argument defaultBrad King2024-04-121-1/+1
| | | | | | | | | | | | Pass it explicitly at the call sites.
* | | cxxmodules: link to `std`-providing targets when availableBen Boeckel2024-04-111-0/+1
|/ /
* | Merge topic 'restore-link-interface-objlib-with-unity'Brad King2024-02-221-1/+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-1/+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
* | Link to transitive dependencies on stub libraries only on some linkersBrad King2024-01-041-0/+3
| | | | | | | | | | Only linkers that enforce `--no-allow-shlib-undefined` recursively need to link private transitive dependencies on stub libraries explicitly.
* | Merge topic 'imported-implib-only'Brad King2023-12-061-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | fc6508921c cmComputeLinkInformation: Restore soname lookup for non-imported targets 03d86f9d9c cmGeneratorTarget: Add helper to check for known runtime artifact Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Acked-by: Robert Maynard <robertjmaynard@gmail.com> Merge-request: !9041
| * cmComputeLinkInformation: Restore soname lookup for non-imported targetsBrad King2023-12-051-1/+0
| | | | | | | | | | | | | | | | | | In commit 7351d590ee (cmTarget: Add a way to represent imported shared library stubs, 2023-07-17, v3.28.0-rc1~344^2) we accidentally stopped passing the SONAME of a non-imported SHARED library to our runtime search path ordering logic. Unfortunately I have not found a way to add a test case for this, but it at least shouldn't regress existing tests or those added by that commit.
| * cmGeneratorTarget: Add helper to check for known runtime artifactBrad King2023-12-051-0/+1
| |
* | LINK_LIBRARY-genex: correct behavior for INTERFACE_LINK_LIBRARIES_DIRECTMarc Chevrier2023-11-291-3/+7
| | | | | | | | Fixes: #25416
* | Merge topic 'fortran-objects-as-sources-fix'Brad King2023-11-271-0/+5
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | beb1393f8f Merge branch 'revert-exact-collation-depends-3.27' into fortran-objects-as-sources-fix a033dce326 Makefiles: provide, but do not consume, "forward linked" target dirs 7cd0adab1b cmCommonTargetGenerator: use modules from linked object-referenced targets 1175f1c874 LinkItem: track `cmSourceFile` instances for external objects d2fa56772f Ninja: support "forwarding" modules from other targets ec1e589bec Ninja: Revert exact collation dependencies for 3.27 06df59b930 cmCommonTargetGenerator: return forward linked target dirs too f8729ab366 cmLocalUnixMakefileGenerator3: handle object-referencing Fortran modules ... Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8989
| * cmGeneratorTarget: add a query for targets with objects in the source listBen Boeckel2023-11-211-0/+5
| | | | | | | | | | | | 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.
* | Add options to specify linker toolMarc Chevrier2023-10-131-0/+7
|/ | | | | | | | | | | | | | | | | | Offer the capability, through variable `CMAKE_LINKER_TYPE`, as well as the target property `LINKER_TYPE` to specify which linker must be used. The implementation of this capability is specified by variables specific to the language and linker type: `CMAKE_<LANG>_USING_LINKER_<TYPE>`. Some definitions are provided as part of `CMake`. For example, to select the `LLVM` linker rather than the standard one, the type `LLD` should be specified through the variable `CMAKE_LINKER_TYPE`. And, on `Apple`, `Linux` and some environments on `Windows`, the variable `CMAKE_<LANG>_USING_LINKER_LLD` has value `-fuse-ld=lld`. And for `Windows` environments based on `MSVC`, where the linker is used directly, the tool `lld-link.exe` will be used rather than `link.exe`. Fixes: #19174, #24254, #24990
* cmGeneratorTarget: Track explicitly enabled language standard levelsBrad King2023-10-051-0/+8
| | | | | 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-5/+4
|
* cmExperimental: remove the flag for C++ modulesBen Boeckel2023-10-021-2/+2
| | | | | | | All the major compilers now have scheduled releases with support for scanning, so remove the experimental gate. Fixes: #18355
* HIP: Add support for NVIDIA GPUsBrad King2023-09-211-1/+3
| | | | | | 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-1/+5
| | | | Prepare to use it for other languages.
* Merge branch 'fortran-object-libraries-release' into fortran-object-librariesBen Boeckel2023-09-051-0/+1
|\ | | | | | | | | | | * 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/+1
| | | | | | | | | | Some locations care about "any config with Fortran", so make a query for such (they may not know any configuration names themselves).
* | cxxmodules: generate synthetic targets as an initial passBen Boeckel2023-08-171-0/+6
| | | | | | | | | | | | 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.