summaryrefslogtreecommitdiffstats
path: root/Source/cmLinkItem.h
Commit message (Collapse)AuthorAgeFilesLines
* Add usage requirements to update direct link dependenciesBrad King2022-01-291-0/+6
| | | | | | | | | | | | | | | | | 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
* cmLinkItem: Clarify name of CMP0027 check memberBrad King2022-01-291-2/+2
| | | | | | | The only purpose of `cmLinkImplItem`'s `FromGenex` member is to decide whether to check CMP0027. That won't be needed for link items added by new interfaces in the future. Clarify the name to indicate that we do not always need to know if the item came from a generator expression.
* HIP: Automatically inject the `hip::device` runtime targetRobert Maynard2021-06-071-0/+5
| | | | | Any target that might need to link to hip code needs the `hip::device` target
* target_link_libraries: Place $<TARGET_OBJECTS> before librariesBrad King2021-05-291-0/+6
| | | | | | | | | 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
* Modernize: Use #pragma once in all header filesKitware Robot2020-09-031-4/+1
| | | | | | | | | | | | | | | | #pragma once is a widely supported compiler pragma, even though it is not part of the C++ standard. Many of the issues keeping #pragma once from being standardized (distributed filesystems, build farms, hard links, etc.) do not apply to CMake - it is easy to build CMake on a single machine. CMake also does not install any header files which can be consumed by other projects (though cmCPluginAPI.h has been deliberately omitted from this conversion in case anyone is still using it.) Finally, #pragma once has been required to build CMake since at least August 2017 (7f29bbe6 enabled server mode unconditionally, which had been using #pragma once since September 2016 (b13d3e0d)). The fact that we now require C++11 filters out old compilers, and it is unlikely that there is a compiler which supports C++11 but does not support #pragma once.
* cmGeneratorTarget: Track when the set of link libs is config-dependentBrad King2020-05-121-0/+6
| | | | | | | Report in `cmLinkImplementationLibraries` and `cmLinkInterfaceLibraries` whether the list of libraries depends on a genex referencing the configuration. We already track whether a genex references the head target.
* Refactoring: add cm::contains to <cmext/algorithm>Marc Chevrier2020-04-171-2/+3
|
* Genex: Add $<LINK_LANGUAGE:...> and $<LINK_LANG_AND_ID:...>Marc Chevrier2020-02-261-0/+6
| | | | | | This MR may help to solve issues #19757 and #18008 Fixes: #19965
* Ninja Multi-Config: Fix issue with framework dependencies and AutogenKyle Edwards2020-02-171-2/+3
| | | | Fixes: #20345
* cmAlgorithms: Add cmContainsRegina Pfeifer2019-08-191-3/+2
| | | | Also, use the new function where applicable.
* cmLinkItem: Simplify tracking of whether link interface is explicitBrad King2019-08-021-1/+1
| | | | We now only need a boolean.
* cmLinkItem: Expose HadHeadSensitiveCondition in cmLinkInterfaceLibrariesBrad King2019-07-231-1/+3
| | | | | Clients may be able to avoid repeating work if they know the transitive link interface libraries do not depend on what is linking them.
* cleanup: Prefer compiler provided special member functionsRegina Pfeifer2019-01-251-4/+0
|
* clang-tidy: Use `= default`Regina Pfeifer2019-01-251-3/+3
| | | | | | Suppress some cases in `Source/cmGeneratorExpressionNode.cxx` and `Source/cmUVHandlePtr.h` where a few older compilers require a user-defined default constructor (with `{}`).
* clang-tidy: Pass by valueRegina Pfeifer2019-01-221-2/+2
|
* clang-tidy: Use default member initializationRegina Pfeifer2018-12-151-31/+15
|
* cmLinkItem: Add backtraceBrad King2018-10-181-5/+4
| | | | | | Carry a backtrace on every link item, not just link implementation items. For now the non-impl items will still have empty backtraces at runtime, but this will allow us to introduce values over time.
* cmLinkItem: Convert to a "sum type" over a string and target pointerBrad King2018-09-071-25/+13
| | | | | | | | | Avoid exposing the item name implicitly as std::string. When the item is a target, avoid storing a second copy of its name. Most link item construction is paired with calls to `FindTargetToLink` to get the possible target pointer. Rename these methods to `ResolveLinkItem` and refactor them to construct the entire item.
* IWYU: Mark cmConfigure.h with pragma: keepDaniel Pfeifer2017-08-261-1/+1
| | | | Also remove `#include "cmConfigure.h"` from most source files.
* Use C++11 nullptrDaniel Pfeifer2017-08-241-2/+2
|
* cmLinkImplItem: remove custom copy ctorDaniel Pfeifer2017-04-211-6/+0
|
* cmLinkItem: remove custom copy ctorDaniel Pfeifer2017-04-211-5/+0
|
* Use quotes for non-system includesDaniel Pfeifer2017-04-111-1/+1
| | | | | | | | | | | | | Automate with: git grep -l '#include <cm_' -- Source \ | xargs sed -i 's/#include <\(cm_.*\)>/#include "\1"/g' git grep -l '#include <cmsys/' -- Source \ | xargs sed -i 's/#include <\(cmsys\/.*\)>/#include "\1"/g' git grep -l '#include <cm[A-Z]' -- Source \ | xargs sed -i 's/#include <\(cm[A-Z].*\)>/#include "\1"/g'
* Fix several include-what-you-use findingsDaniel Pfeifer2016-11-081-0/+8
|
* Simplify CMake per-source license noticesBrad King2016-09-271-12/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Per-source copyright/license notice headers that spell out copyright holder names and years are hard to maintain and often out-of-date or plain wrong. Precise contributor information is already maintained automatically by the version control tool. Ultimately it is the receiver of a file who is responsible for determining its licensing status, and per-source notices are merely a convenience. Therefore it is simpler and more accurate for each source to have a generic notice of the license name and references to more detailed information on copyright holders and full license terms. Our `Copyright.txt` file now contains a list of Contributors whose names appeared source-level copyright notices. It also references version control history for more precise information. Therefore we no longer need to spell out the list of Contributors in each source file notice. Replace CMake per-source copyright/license notice headers with a short description of the license and links to `Copyright.txt` and online information available from "https://cmake.org/licensing". The online URL also handles cases of modules being copied out of our source into other projects, so we can drop our notices about replacing links with full license text. Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority of the replacements mechanically. Manually fix up shebang lines and trailing newlines in a few files. Manually update the notices in a few files that the script does not handle.
* use CM_NULLPTRDaniel Pfeifer2016-06-281-2/+2
|
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-38/+68
| | | | | | | | | | | | | Run the `Utilities/Scripts/clang-format.bash` script to update all our C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
* Make cmLinkInterface:: and cmGeneratorTarget::Multiplicity unsigned intsChristoph GrĂ¼ninger2016-02-041-1/+1
|
* Move ComputeLinkType out of cmTarget.Stephen Kelly2015-10-201-0/+24
| | | | | Keep it out of the way, so that it does not become part of cmGeneratorTarget, but where it can be used to implement CMP0003.
* cmLinkItem: Port to cmGeneratorTarget.Stephen Kelly2015-10-121-4/+3
|
* cmHeadToLinkInterfaceMap: Port to cmGeneratorTarget.Stephen Kelly2015-10-121-1/+2
|
* cmLinkItem: Add cmOptionalLinkImplementation type.Stephen Kelly2015-08-261-0/+11
| | | | Move the associated Compute* methods to the cmTarget class.
* cmLinkItem: Add cmLinkImplementation type.Stephen Kelly2015-08-261-0/+6
|
* cmTarget: Move cmHeadToLinkInterfaceMap out.Stephen Kelly2015-08-261-0/+5
|
* cmTarget: Move link interface libraries struct out.Stephen Kelly2015-08-261-0/+40
|
* cmLinkImplementationLibraries: Move to namespace scope.Stephen Kelly2015-08-061-0/+12
|
* cmLinkItem: Split to separate file.Stephen Kelly2015-08-061-0/+47