summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'vs-csharp-dotnet-sdk'Brad King2021-12-221-0/+5
|\ | | | | | | | | | | | | | | | | 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/+5
| | | | | | | | | | | | | | | | 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/+49
| | | | | | | | | | | | | | | | | | | | 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
* | cmGeneratorTarget: Factor out message about reasons for a missing targetBrad King2021-12-201-5/+11
| |
* | CMP0028: Report the target whose link interface has an offending itemBrad King2021-12-161-36/+78
| | | | | | | | | | | | | | | | | | | | | | | | Previously items linked via the link interface of a dependency were reported in CMP0028 messages as if directly linked by a target. Clarify the messages to indicate that an offending item is actually in the link interface of a given target, regardless of its consumer. Move the check to the end of generation and look through the final set of link implementations and link interfaces that were used for generation. This avoids repeating messages on link interfaces that have multiple consumers.
* | CMP0028: Report backtrace to link item rather than target creationBrad King2021-12-161-1/+5
| | | | | | | | | | | | Now that we have proper backtraces for both `LINK_LIBRARIES` and `INTERFACE_LINK_LIBRARIES` entries, we can report them in error messages.
* | cmGeneratorTarget: Record when imported target link iface libs are doneBrad King2021-12-161-0/+1
| | | | | | | | | | | | `GetImportLinkInterface` populates the link interface from properties of imported targets. Make it more closely match the link interface of in-project targets by recording the `LibrariesDone` field.
* | cmGeneratorTarget: Propagate backtraces from INTERFACE_LINK_LIBRARIESBrad King2021-12-151-45/+66
|/
* Merge topic 'link-iface-usage-reqs-only'Brad King2021-12-101-44/+53
|\ | | | | | | | | | | | | | | 1e49880472 cmGeneratorTarget: Avoid boolean trap in usage requirement lookup Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !6796
| * cmGeneratorTarget: Avoid boolean trap in usage requirement lookupBrad King2021-12-091-44/+53
| | | | | | | | | | Replace `bool usage_requirements_only` arguments with a proper enumeration to clarify meaning at call sites.
* | cmTargetPropertyComputer: Simplify by restoring use of cmMakefileBrad King2021-12-081-6/+3
|/ | | | | | | | | | | Logically revert commit 390a7d8647 (cmTargetPropertyComputer: Implement GetProperty without cmMakefile, 2016-10-13, v3.8.0-rc1~445^2~9). It relied on using `cmListFileBacktrace` to get a scope in which to look up policies. This does remove a backtrace from `LOCATION` property errors at generate time, but the backtrace we reported before was incorrect. It pointed at the addition of a target, not to the reference to the property.
* Merge topic 'support_nvcc_native_flag'Brad King2021-11-021-3/+16
|\ | | | | | | | | | | | | | | 14d8a2768d CUDA: Support nvcc 11.5 new -arch=all|all-major flags Acked-by: Kitware Robot <kwrobot@kitware.com> Reviewed-by: Raul Tambre <raul@tambre.ee> Merge-request: !6652
| * CUDA: Support nvcc 11.5 new -arch=all|all-major flagsRobert Maynard2021-11-011-3/+16
| |
* | cmGeneratorTarget: Integrate file sets into calculated sourcesKyle Edwards2021-10-271-1/+144
| |
* | Source: fix many -Wmissing-prototypes warnings by marking functions staticSean McBride2021-10-251-21/+26
|/
* Add property to mark IMPORTED targets as not SYSTEMBrad King2021-10-141-0/+3
| | | | | | | | | | | Add an `IMPORTED_NO_SYSTEM` target property to specify this. When enabled, do not treat the `INTERFACE_INCLUDE_DIRECTORIES` of an imported target as `SYSTEM` include directories. This is similar to the existing `NO_SYSTEM_FROM_IMPORTED` property, but works from the consumed target rather than the consumer. Fixes: #17364
* Source: Fix clang -Wimplicit-fallthrough warningsSean McBride2021-09-281-0/+6
|
* Rename cmProp in cmValueMarc Chevrier2021-09-211-124/+127
|
* Merge topic 'macos-cache-rpath-install-namedir'Brad King2021-09-211-0/+15
|\ | | | | | | | | | | | | 2266e223c5 macOS: Speed up rpath install name dir lookup with a cache Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6543
| * macOS: Speed up rpath install name dir lookup with a cacheLukas Böger2021-09-201-0/+15
| | | | | | | | Fixes: #20602
* | remove cmToCStr functionMarc Chevrier2021-09-191-1/+1
|/
* Merge topic 'pch-xcode-multiple-languages'Brad King2021-09-141-2/+2
|\ | | | | | | | | | | | | | | bbcdac4e5d PCH: Fix all-language precompile header support in Xcode Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !6435
| * PCH: Fix all-language precompile header support in XcodeCristian Adam2021-09-131-2/+2
| | | | | | | | Fixes: #22384
* | Refactor: Convert parallel string/backtrace vectors to BT vectorsKyle Edwards2021-09-031-56/+47
| |
* | Refactor: reduce cmToCStr usageMarc Chevrier2021-08-191-12/+9
| |
* | Refactor: cmGeneratorTarget::GetSourcesProperty returns cmPropMarc Chevrier2021-08-091-3/+3
| |
* | cmProp: refactoring: transform alias in classMarc Chevrier2021-08-081-14/+13
|/ | | | | | To handle safely the values used by CMake variables and properties, introduce the class cmProp as a replacement from the simple pointer to std::string instance.
* cmGeneratorTarget: Clarify logic recognizing explicit link interfaceBrad King2021-07-131-6/+6
|
* cmGeneratorTarget: Clarify cmLinkImplItem constructor callBrad King2021-07-131-1/+2
|
* cmGeneratorTarget: Clarify ExpandLinkItems local variable roleBrad King2021-07-131-4/+7
|
* cmGeneratorTarget: Simplify ExpandLinkItems signatureBrad King2021-07-131-30/+17
|
* cmGeneratorTarget: Add method for LINKER: prefix translationMarc Chevrier2021-07-081-0/+7
|
* Merge topic 'tll-out-of-dir'Brad King2021-06-301-6/+8
|\ | | | | | | | | | | | | e27a76f131 target_link_libraries: Restore transitive out-of-dir linking Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6285
| * target_link_libraries: Restore transitive out-of-dir linkingBrad King2021-06-291-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | Refactoring in commit 7f506b95a7 (cmGeneratorTarget: Refactor link item lookup, 2021-05-26, v3.21.0-rc1~103^2~4) accidentally dropped the persistent lookup scope tracking across multiple items that was 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). This broke a transitive out-of-dir linking case not covered by our test suite. Restore the scope tracking and add a test case. Fixes: #22363
* | Merge topic 'import-elf'Brad King2021-06-251-7/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 115ff6a347 cmELF: Include the ELF parsing code unconditionally 5dfa3ddbe5 cmELF: Allow building without system ELF headers 0da1540aaa cmELF: Fix check for TagMipsRldMapRel e21188df8b cmELF: Open file explicitly in binary mode 70cdb36d25 Merge branch 'upstream-elf' into import-elf 7a0a37ca41 elf 2021-06-23 (f13da247) 18038042ed cmelf: Add script to import the FreeBSD ELF headers Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6240
| * | cmELF: Include the ELF parsing code unconditionallyAlex Richardson2021-06-241-7/+2
| |/ | | | | | | | | Now that the ELF definitions are provided on all platforms there is no need to keep the CMake_USE_ELF_PARSER option.
* | Makefiles: Add support for building Fortran intrinsicsIsuru Fernando2021-06-241-0/+8
|/ | | | Fixes: #21463
* HIP: analyze output of `hipcc` to determine default GPU architectureZack Galbreath2021-06-071-0/+6
|
* HIP: Automatically inject the `hip::device` runtime targetRobert Maynard2021-06-071-26/+170
| | | | | Any target that might need to link to hip code needs the `hip::device` target
* HIP: Add language to CMakeRobert Maynard2021-06-071-3/+21
|
* cmGeneratorTarget: Clear cached link implementation when a source is addedBrad King2021-06-041-0/+1
| | | | | | Adding a source file at generate time can cause the linker language or other settings to change that affect `GetLinkImplementationLibraries` and friends.
* target_link_libraries: Place $<TARGET_OBJECTS> before librariesBrad King2021-05-291-5/+33
| | | | | | | | | Linkers always use object files explicitly specified on the command line regardless of where they appear. Move them to the front of the list of linked libraries in so that symbols required by the object files can be resolved by any library. Issue: #22149
* cmGeneratorTarget: Refactor link item lookupBrad King2021-05-281-14/+23
| | | | | Look up items individually so the call sites can do something with the result besides appending to a vector.
* cmGeneratorTarget: Give temporary link impl item an explicit nameBrad King2021-05-281-2/+2
|
* Xcode: Enable multi-arch TARGET_OBJECTS genex in [INTERFACE_]LINK_LIBRARIESBrad King2021-05-261-0/+2
| | | | This was an oversight in the original implementation.
* Framework: Fix $<TARGET_SONAME_FILE:...> for imported frameworksKyle Edwards2021-05-201-3/+26
|
* Source: Remove unnecessary comparisons to nullptrVitaly Stakhovsky2021-05-101-6/+5
|
* Merge topic 'CUDA-device-link'Brad King2021-04-011-8/+52
|\ | | | | | | | | | | | | bb96984ec9 CUDA Device link: Ensure all link options are correctly formatted Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5962
| * CUDA Device link: Ensure all link options are correctly formattedMarc Chevrier2021-03-311-8/+52
| | | | | | | | Fixes: #21994
* | Genex: Add TARGET_RUNTIME_DLLS genexKyle Edwards2021-02-241-0/+14
|/ | | | Co-Authored-by: Brad King <brad.king@kitware.com>