summaryrefslogtreecommitdiffstats
path: root/Source/cmComputeLinkInformation.h
Commit message (Collapse)AuthorAgeFilesLines
* cmComputeLinkInformation: track OBJECT library dependenciesBen Boeckel2023-07-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | In commit b6a5382217 (Ninja: depend on language module information files directly, 2023-02-10), introduced via !8197, language-specific module information files (`CMakeFiles/<target>.dir/<lang>Modules.json`) files were added as real dependencies to the dyndep collation steps. Previously, the behavior was to inform the collator of all possible targets and search for the files manually ignoring those which did not exist with ordering enforced by depending on the linker output of all dependent targets. This behavior could lead to stale information being used (e.g., if a target stops providing any targets) and also did not reliably build everything needed on rebuilds. Afterwards, the internal computation changed the dependency from all possible targets to an exact set of "these targets might have modules" query, however one that did not include `OBJECT` libraries since do not have `LinkEntry` items internally (their objects are instead treated as source files). As a stopgap measure, track `OBJECT` libraries in a separate list and query them explicitly when gathering targets which may have interesting information. Future work can add `LinkEntry` items to represent these targets once all `LinkEntry` consumers have been audited to make sure they are not surprised by any `OBJECT` library entries. Fixes: #25112
* Genex-LINK_GROUP: Add possibility to group libraries at link stepMarc Chevrier2022-02-281-6/+31
| | | | Fixes: #23121
* GenEx/LINK_LIBRARY: Add features for framework support on AppleMarc Chevrier2022-02-151-0/+5
|
* cmGlobalGenerator: Add helper to split framework pathMarc Chevrier2022-02-131-1/+0
| | | | | cmComputeLinkInformation and cmGlobalXCodeGenerator now rely on this method to handle framework paths.
* Genex: Add $<LINK_LIBRARY:...>Marc Chevrier2022-02-071-12/+53
| | | | | | | | 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
* cmComputeLinkInformation: use cmComputeLinkDepends::LinkEntryMarc Chevrier2022-02-061-13/+13
| | | | | | In preparation of support of genex $<LINK_LIBRARY:...>, propagate cmComputeLinkDepends::LinkEntry instances to ensure to have, when needed, all attributes attached to the link item.
* cmComputeLinkInformation: Add context to warning about linking a directoryBrad King2021-10-271-1/+1
|
* Rename cmProp in cmValueMarc Chevrier2021-09-211-2/+2
|
* Refactor: reduce cmToCStr usageMarc Chevrier2021-08-191-1/+2
|
* OpenWatcom: Add infrastructure to link to object filesBrad King2021-05-291-2/+18
|
* cmComputeLinkInformation: Improve type safety of item IsPath memberBrad King2021-05-291-3/+10
| | | | Use an enum to avoid implicit conversions to bool.
* Genex: Add TARGET_RUNTIME_DLLS genexKyle Edwards2021-02-241-0/+6
| | | | Co-Authored-by: Brad King <brad.king@kitware.com>
* Xcode: Don't hard-code SDK-provided implicit framework search pathsCraig Scott2021-02-031-0/+1
| | | | | | | | | | | | When a framework is linked to a target by its full path and that framework is located in one of the implicit framework search directories, CMake 3.18.5 and earlier discarded that path. ce2dee9e5ba (Xcode: Don't add framework as -framework argument in linker info list, 2020-09-28) introduced a regression which resulted in the framework path always being added to the search path even if it matched one of the implicit search paths. This broke the ability to do device and simulator builds from the same configured project. Fixes: #21678
* cmComputeLinkInformation: Fix misspelt private variable nameCraig Scott2021-02-031-1/+1
|
* Apple: Fix linking to frameworks that do not exist until build timeBrad King2021-02-021-1/+0
| | | | Fixes: #21621
* 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.
* cmComputeLinkInformation: members use std:string argumentsVitaly Stakhovsky2020-07-101-3/+3
|
* Merge branch 'backport-3.16-link-line-backtrace'Brad King2020-02-101-9/+11
|\
| * Propagate backtraces from LINK_LIBRARIES through to link line itemsBrad King2020-02-101-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | Since commit d4d0dd0f6a (cmLinkLineComputer: Add ComputeLinkLibs overload with backtraces, 2019-09-13, v3.16.0-rc1~87^2~4), backtraces have been collected by `ComputeLinkLibs` by looking back through the link implementation libraries for one matching the text of the link line item. This is slow in projects with long link lines. Instead, teach `cmComputeLinkDepends` and `cmComputeLinkInformation` to carry backtrace information explicitly along with the text of each item. Fixes: #20322
* | Merge topic 'modernize-memory-management'Brad King2020-01-281-3/+7
|\ \ | | | | | | | | | | | | | | | | | | b50b2755da cmComputeLinkInformation: modernize memory management Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4285
| * | cmComputeLinkInformation: modernize memory managementMarc Chevrier2020-01-261-3/+7
| |/
* | CUDA: Add abstraction for cuda runtime selectionRobert Maynard2020-01-271-0/+1
|/ | | | | Fixes #17559 Replace our hard-coded default of cudart=static with a first-class abstraction to select the runtime library from an enumeration of logical names.
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-1/+2
| | | | | Run the `clang-format.bash` script to update our C and C++ code to a new include order `.clang-format`. Use `clang-format` version 6.0.
* cmLinkLineComputer: Add ComputeLinkLibs overload with backtracesJustin Goshi2019-09-181-0/+2
|
* cmComputeLinkInformation: Add GetDirectoriesWithBacktracesJustin Goshi2019-09-181-0/+1
|
* cmComputeLinkInformation: Add AppendValues with backtracesJustin Goshi2019-09-181-0/+3
|
* clang-tidy: Replace typedef with usingRegina Pfeifer2019-09-031-1/+1
|
* Make CMAKE_LINK_LIBRARY_FILE_FLAG work like CMAKE_LINK_LIBRARY_FLAGBrad King2019-08-021-0/+5
| | | | | | | | | | | | | | | | | | The `CMAKE_LINK_LIBRARY_FILE_FLAG` variable is meant for linkers that want library file paths to be preceded by a flag. This is used only for OpenWatcom to add the `library` argument before library file paths. Refactor the approach to treat `CMAKE_LINK_LIBRARY_FILE_FLAG` as a command-line string fragment to add just before the library file path. This has two advantages: * `CMAKE_LINK_LIBRARY_FILE_FLAG` now works like `CMAKE_LINK_LIBRARY_FLAG`. * `CMAKE_LINK_LIBRARY_FILE_FLAG` can now be an attached flag whose value is the library file path. Technically this is a change in behavior, but this setting was created for internal use and should be rarely used outside of CMake itself. Fixes: #19541
* Refactor checks for whether a target has an import libraryBrad King2019-07-121-1/+0
| | | | Use `HasImportLibrary` for such checks.
* clang-tidy: Use `= default`Regina Pfeifer2019-01-251-1/+1
| | | | | | 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-3/+3
|
* clang-tidy: Use default member initializationRegina Pfeifer2018-12-151-7/+3
|
* clang-tidy: Remove redundant member initializationsRegina Pfeifer2018-12-151-2/+1
|
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-011-0/+1
| | | | | | | | | | | | Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`. Use `clang-format` version 6.0. * 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.
* cmComputeLinkInformation: make some members constVitaly Stakhovsky2018-03-221-14/+14
|
* cmComputeLinkInformation: make GetItems() constMichael Stürmer2018-03-191-1/+1
|
* Use C++11 nullptrDaniel Pfeifer2017-08-241-2/+2
|
* cmComputeLinkInformation::Item: remove custom copy ctorDaniel Pfeifer2017-04-211-6/+0
|
* Use quotes for non-system includesDaniel Pfeifer2017-04-111-2/+2
| | | | | | | | | | | | | 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'
* CUDA: Add LinkLineComputer that computes cuda dlink lines.Robert Maynard2016-11-141-0/+1
|
* Simplify CMake per-source license noticesBrad King2016-09-271-11/+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.
* fix a batch of include-what-you-use violationsDaniel Pfeifer2016-08-231-3/+7
|
* use CM_NULLPTRDaniel Pfeifer2016-06-281-2/+3
|
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-7/+25
| | | | | | | | | | | | | 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.
* cmComputeLinkInformation: Port result API to cmGeneratorTarget.Stephen Kelly2015-10-121-3/+2
|
* cmComputeLinkInformation: Port data interface to cmGeneratorTarget.Stephen Kelly2015-10-121-2/+2
|
* cmComputeLinkInformation: Port some implementation to cmGeneratorTarget.Stephen Kelly2015-10-121-2/+2
|
* cmComputeLinkDepends: Port some API to cmGeneratorTarget.Stephen Kelly2015-10-101-2/+2
|
* cmComputeLinkInformation: Port to cmGeneratorTarget.Stephen Kelly2015-08-051-2/+3
|
* cmGeneratorTarget: Move GetLinkClosure from cmTarget.Stephen Kelly2015-08-051-0/+1
|