summaryrefslogtreecommitdiffstats
path: root/Source/cmComputeLinkInformation.h
Commit message (Collapse)AuthorAgeFilesLines
* Apple: Fix linking to frameworks that do not exist until build timeBrad King2020-12-211-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
|
* Merge topic 'data-layout'Brad King2015-06-081-18/+17
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8174e5cd cmCustomCommand: Remove special member functions. 34e1d6db cmCustomCommand: Re-arrange data layout. 54cb76f2 cmComputeLinkDepends: Re-arrange data layout. b661d6c6 cmQtAutoGenerators: Re-arrange data layout. 40844a14 cmProcessTools: Re-arrange data layout. b1ff32af cmOrderDirectories: Re-arrange data layout. dd0417c7 cmInstallTargetGenerator: Re-arrange data layout. 125c4866 cmInstallFilesGenerator: Re-arrange data layout. 92b8b1fc cmGraphVizWriter: Re-arrange data layout. 7f3e1623 cmGlobalGenerator: Re-arrange data layout. d9df7fa7 cmComputeComponentGraph: Re-arrange data layout. db24e41b cmCommandArgumentParserHelper: Re-arrange data. 4cd13e80 cmComputeLinkInformation: Re-arrange data layout. 3e087a40 cmLocalUnixMakefileGenerator: Re-arrange data layout. e0421701 cmMakefile: Re-arrange data layout. c26696eb cmSourceFile: Re-arrange data. ...
| * cmComputeLinkInformation: Re-arrange data layout.Stephen Kelly2015-06-071-18/+17
| | | | | | | | Size goes from 1944 to 1920 bytes.
* | cmComputeLinkInformation: Port to cmOutputConverter.Stephen Kelly2015-06-061-2/+0
|/
* Link libraries by full path even in implicit directoriesBrad King2015-04-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | When CMP0003 was first introduced we wanted to link all libraries by full path. However, some projects had problems on platforms where find_library would find /usr/lib/libfoo.so when the project really wanted to link to /usr/lib/<arch>/libfoo.so and had been working by accident because pre-CMP0003 behavior used -lfoo to link. We first tried to address that in commit v2.6.0~440 (Teach find_library to avoid returning library paths in system directories, 2008-01-23) by returning just "foo" for libraries in implicit link directories. This caused problems for projects expecting find_library to always return a full path. We ended up using the solution in commit v2.6.0~366 (... switch library paths found in implicit link directories to use -l, 2008-01-31). However, the special case for libraries in implicit link directories has also proven problematic and confusing. Introduce policy CMP0060 to switch to linking all libraries by full path even if they are in implicit link directories. Explain in the policy documentation the factors that led to the original approach and now to this approach.
* cmComputeLinkInformation: Remove 'head' argumentBrad King2014-06-231-3/+1
| | | | | | It is only ever constructed with the current target as its own 'head'. Co-Author: Stephen Kelly <steveire@gmail.com>
* stringapi: Pass configuration names as stringsBen Boeckel2014-03-081-2/+2
|
* strings: Remove cmStdString referencesBen Boeckel2014-03-081-5/+5
| | | | | | | | | | | Casts from std::string -> cmStdString were high on the list of things taking up time. Avoid such implicit casts across function calls by just using std::string everywhere. The comment that the symbol name is too long is no longer relevant since modern debuggers alias the templates anyways and the size is a non-issue since the underlying methods are generated since it's inherited.
* stringapi: Use strings for the languagesBen Boeckel2014-03-081-2/+2
|
* Constify handling of link targets.Stephen Kelly2013-12-111-8/+9
|
* cmTarget: Make GetProperty() const.Stephen Kelly2013-10-311-4/+4
| | | | | | This has follow-on effects for other methods and classes. Further work on making the use of const cmTarget pointers common can be done, particularly with a view to generate-time methods.
* Recognize shared library files with a numerical suffixStephen Kelly2013-05-211-1/+2
| | | | | | When processing link line entries we check for matches with known naming patterns for static and shared libraries. Teach this logic to recognize numerical suffixes after shared library names such as "libfoo.so.1".
* Make linking APIs aware of 'head' targetStephen Kelly2013-01-081-1/+3
| | | | | | | | | | | The 'head' is the dependent target to be linked with the current target. It will be used to evaluate generator expressions with proper handling of mapped configurations and is used as the source target of properties. This requires that memoization is done with a key of a pair of target and config, instead of just config, because now the result also depends on the target. Removing the memoization entirely is not an option because it slows cmake down considerably.
* Optionally skip link dependencies on shared library filesBrad King2012-10-261-0/+1
| | | | | | | Add target property LINK_DEPENDS_NO_SHARED and initialization variable CMAKE_LINK_DEPENDS_NO_SHARED to enable this behavior. Suggested-by: Leif Walsh <leif.walsh@gmail.com>
* Recognize OpenBSD versioned .so names (#12954)Brad King2012-02-131-0/+1
| | | | | | OpenBSD shared library names end in a ".#.#" version number suffix. Teach cmComputeLinkInformation to tolerate the extra suffix after the normal library name suffixes when parsing library names.