summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.h
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* 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.
* 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.
* | cmGeneratorTarget: classify BMI-only C++ module sourcesBen Boeckel2023-08-171-0/+3
| |
* | cmGeneratorTarget: support better errors when checking for C++20 modulesBen Boeckel2023-08-161-1/+4
| | | | | | | | | | 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/+1
| | | | | | | | Fixes: #21517
* | IWYU: Update for Debian 12 CI jobBrad King2023-07-281-1/+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/+2
| | | | | | | | Issue: #21752
* | cmTarget: Add a way to represent imported shared library stubsRobert Maynard2023-07-181-0/+1
| | | | | | | | | | | | | | | | Shared library stubs can be used for linking, but not at runtime. Their role is similar to import libraries on Windows, so represent their location with the `IMPORTED_IMPLIB` target property. Fixes: #24940
* | macOS: Allow IMPORTED_LOCATION to be a framework folderKyle Edwards2023-06-231-0/+4
|/ | | | Issue: #24946
* Merge topic 'use-linker-depfile'Brad King2023-05-041-0/+3
|\ | | | | | | | | | | | | | | 375e6fdbbe Link step: use linker dependency linker file 24a3e5cda0 cmLocalGenerator::MayBeRelativeToWorkDir: take care of all cases Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8443
| * Link step: use linker dependency linker fileMarc Chevrier2023-05-031-0/+3
| | | | | | | | | | | | Based on work done by @ben.boeckel (!8051) Fixes: #22217
* | Autogen: Add AUTOGEN_USE_SYSTEM_INCLUDE target propertyOrkun Tokdemir2023-05-031-0/+2
|/ | | | | | | `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.
* cmGeneratorTarget: Factor out EvaluatedTargetProperty infrastructureOrkun Tokdemir2023-04-051-0/+22
| | | | | Make it available outside the `cmGeneratorTarget` implementation. In particular, we will later use it in `cmQtAutoGenInitializer`.
* cmGeneratorTarget: Pass language to GetAppleArchs when possibleBrad King2023-03-151-1/+2
|
* cmGeneratorTarget: Convert GetAppleArchs output argument to return valueBrad King2023-03-151-2/+1
|
* Apple: Handle generation and comsuption of text-based stubs (.tbd files)Marc Chevrier2023-03-011-2/+12
| | | | Fixes: #24123
* Enhance support functionsMarc Chevrier2023-02-281-0/+5
| | | | | * Avoid duplicate definiitions for IsExecutableWithExports, etc... * Add helper IsApple()
* cmMakefile: add support for a "synthesized" targetBen Boeckel2023-02-141-0/+1
| | | | | | It is a normal target, but will end up copying its internals from another target. Keep track of this state so that such copying can only occur when intended.
* cmTarget: store visibility as an `enum` rather than boolsBen Boeckel2023-02-141-0/+1
| | | | | | | | C++ modules are going to introduce a third concept of "synthesized" targets, so update logic where needed to avoid assuming "not imported? must be normal". Also add an accessor method to perform queries against the visibility.
* cmGeneratorTarget: add a method to query if Fortran sources existBen Boeckel2023-02-011-0/+2
|
* cmGeneratorTarget: Cache full name componentsPierre Testart2023-01-181-8/+18
| | | | | Cache the result of cmGeneratorTarget::GetFullNameInternalComponents to improve performance.
* clang-tidy: add <LANG>_CLANG_TIDY_EXPORT_FIXES_DIR propertyKyle Edwards2022-12-061-0/+2
| | | | Fixes: #21362
* Merge topic 'add-generator-target-caches'Brad King2022-11-301-0/+12
|\ | | | | | | | | | | | | | | f69d1872db cmGeneratorTarget: Add caches to some functions Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !7952
| * cmGeneratorTarget: Add caches to some functionsPierre Testart2022-11-281-0/+12
| | | | | | | | | | | | | | | | | | | | | | Add caches to the following cmGeneratorTarget functions in order to improve performance: - GetIncludeDirectories - GetCompileOptions - GetCompileDefinitions - GetPrecompileHeaders - GetLinkOptions - GetLinkDirectories
* | cmGeneratorTarget: factor out fileset info and scanning detectionBen Boeckel2022-11-231-0/+14
| |
* | cmGeneratorTarget: factor out dyndep support detectionBen Boeckel2022-11-231-0/+4
|/
* CUDA: Add Device LTO support for nvccRobert Maynard2022-07-221-1/+4
| | | | Fixes #22200
* cmTarget: add support for C++ module fileset typesBen Boeckel2022-06-161-0/+30
| | | | | | | | | | | | | | | C++ modules have two variants which are of importance to CMake: - `CXX_MODULES`: interface modules (those using `export module M;`, `export module M:part;`, or `module M:internal_part;`) - `CXX_MODULE_HEADER_UNITS`: importable header units Creating C++ modules or partitions are *not* supported in any other source listing. This is because the source files must be installed (so their scope matters), but not part of usage requirements (what it means for a module source to be injected into a consumer is not clear at this moment). Due to the way `FILE_SET` works with scopes, they are a perfect fit as long as `INTERFACE` is not allowed (which it is not).
* clang-tidy: address `modernize-use-default-member-init` lintsBen Boeckel2022-05-241-14/+14
|
* export: Fix TARGET_NAME lookup for out-of-dir linkingBrad King2022-04-011-3/+3
| | | | | | | Improve the logic added by commit f0e67da061 (target_link_libraries: Fix out-of-dir linking of a list of targets, 2020-01-14, v3.17.0-rc1~149^2) to, while exporting targets, look up referenced target names in the correct directory.
* FILE_SET: Add VERIFY_HEADER_SETS target propertyKyle Edwards2022-03-291-0/+5
| | | | Fixes: #23338
* LINK_LIBRARIES: Evaluate separately for linking and usage requirementsBrad King2022-03-221-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Genex: Add $<LINK_LIBRARY:...>Marc Chevrier2022-02-071-1/+2
| | | | | | | | This generator expression offers the capability, for the link step, to decorate libraries with prefix/suffix flags and/or adding any specific flag for each library. Fixes: #22812, #18751, #20078, #22703
* Merge topic 'link-interface-direct'Brad King2022-01-311-3/+20
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | f3ad061858 Add usage requirements to update direct link dependencies 193a999cd5 cmTarget: Add INTERFACE_LINK_LIBRARIES_DIRECT{,_EXCLUDE} backtrace storage 22d5427aa6 cmGeneratorTarget: Add LookupLinkItem option to consider own target name f3d2eab36a cmGeneratorTarget: Fix link interface caching of partial results d75ab9d066 cmGeneratorTarget: Clarify CMP0022 logic in ComputeLinkInterfaceLibraries f3e9e03fe0 cmGeneratorTarget: Simplify CMP0022 warning check 216aa14997 cmGeneratorTarget: Return early from ExpandLinkItems with no items 1bc98371d1 Tests: Remove unnecessary policy setting from ObjectLibrary test ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6886
| * Add usage requirements to update direct link dependenciesBrad King2022-01-291-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Link line construction starts with `LINK_LIBRARIES` and appends dependencies from the transitive closure of `INTERFACE_LINK_LIBRARIES`. Only the entries of `LINK_LIBRARIES` are considered direct link dependencies. In some advanced use cases, particularly involving static libraries and static plugins, usage requirements need to update the list of direct link dependencies. This may mean adding new items, removing existing items, or both. Add target properties to encode these usage requirements: * INTERFACE_LINK_LIBRARIES_DIRECT * INTERFACE_LINK_LIBRARIES_DIRECT_EXCLUDE Fixes: #22496
| * cmGeneratorTarget: Add LookupLinkItem option to consider own target nameBrad King2022-01-291-1/+7
| |
| * PCH: Clear link interface cache when adding PCH object to itBrad King2022-01-291-0/+3
| | | | | | | | | | | | | | On platforms using `CMAKE_LINK_PCH`, the implementation of `PRECOMPILE_HEADERS_REUSE_FROM`, when re-using the PCH from one object library in another, adds a PCH object file to the link interface. Clear any cached link interface to ensure it is used.
* | cmGlobalVisualStudio10Generator: Auto restore NuGet packages.Carsten Rudolph2022-01-221-0/+3
|/
* Merge topic 'vs-csharp-dotnet-sdk'Brad King2021-12-221-0/+2
|\ | | | | | | | | | | | | | | | | 0eea32a376 VS: Add DOTNET_SDK property to generate SDK-style C# projects a450cc9533 VS: Set ResolveNugetPackages to false for ALL_BUILD and ZERO_CHECK fa76e5d194 cmVisualStudio10TargetGenerator: Factor out helper for classic MSBuild project Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6634
| * VS: Add DOTNET_SDK property to generate SDK-style C# projectsSumit Bhardwaj2021-12-211-0/+2
| | | | | | | | | | | | | | | | Changes in cmVisualStudio10TargetGenerator::Generate to write .Net SDK-style project for VS generators VS 19 and above. Also adds documentation and tests. Issue: #20227
* | target_link_libraries: Optionally require only target namesBrad King2021-12-201-0/+1
| | | | | | | | | | | | | | | | | | | | Optionally verify that items in `LINK_LIBRARIES` and `INTERFACE_LINK_LIBRARIES` that can be target names are actually target names. Add a `LINK_LIBRARIES_ONLY_TARGETS` target property and corresponding `CMAKE_LINK_LIBRARIES_ONLY_TARGETS` variable to enable this new check. Fixes: #22858