summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallTargetGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* IWYU: Update for Debian 12 CI jobBrad King2023-07-281-0/+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.
* Merge topic 'strip-macos'Brad King2023-03-311-7/+10
|\ | | | | | | | | | | | | | | 689616785f macOS: Do not pass Apple-specific flags to llvm-strip Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8374
| * macOS: Do not pass Apple-specific flags to llvm-stripBrad King2023-03-291-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit cf82300a63 (BinUtils: Clarify search logic and make it more consistent, 2021-05-27, v3.21.0-rc1~119^2~2) we prefer `llvm-strip` over `strip` when using Clang. However, since commit 20291e8e72 (install: Fix stripping on macOS, 2019-01-30, v3.14.0-rc1~31^2) on macOS we add flags `-u -r`, needed by Apple's `strip` for executables, but that `llvm-strip` does not need or support. Improve the condition to add Apple-specific flags only when the selected `strip` tool is Apple's. Note that Apple dylibs must be stripped with `-x` with either Apple's `strip` or `llvm-strip`. Fixes: #24601
* | install(TARGETS): Do not apply installation tweaks to NAMELINK filesBrad King2023-03-281-4/+6
|/ | | | | | | | | | | | These files are symlinks to the real binaries, and we already apply tweaks to those. Previously we generated installation tweak code guarded by a `NOT IS_SYMLINK` condition that is never true. Drop the code altogether. Add a test covering the motivating use case, in which a `POST_BUILD` step modifies the namelink file to not actually be a symlink. Fixes: #24647
* Apple: Handle generation and comsuption of text-based stubs (.tbd files)Marc Chevrier2023-03-011-74/+111
| | | | Fixes: #24123
* Enhance support functionsMarc Chevrier2023-02-281-3/+3
| | | | | * Avoid duplicate definiitions for IsExecutableWithExports, etc... * Add helper IsApple()
* clang-tidy: address `modernize-use-default-member-init` lintsBen Boeckel2022-05-241-1/+0
|
* cmInstallTargetGenerator: optimize rpath adjustmentsSeth R Johnson2021-09-301-22/+43
| | | | | | | | | | | | | | | With builds that have many internal library directories or many external libraries, rpaths can be quite large. The cost of calling install_name_tool thousands of times can add up to minutes on a build, especially if virus scanning software is there to help you out. With this change, instead of deleting and then re-adding an rpath, we ignore it. Likewise we batch all the rpath adjustment calls into a single command. Before, installing SCALE (some libraries have 70+ build-time RPATHs that get deleted, plus up to a dozen external RPATHs from upstream dependencies that should remain in the binary) would take almost 9 minutes on my laptop, and after this change the installation takes only 30 second.
* Rename cmProp in cmValueMarc Chevrier2021-09-211-3/+3
|
* Refactor: Move common methods into cmInstallGeneratorKyle Edwards2021-05-311-62/+11
|
* install: Implement new install(CODE|SCRIPT) option ALL_COMPONENTSNils Gladitz2021-05-191-1/+1
| | | | | | | | | | | In a per-component installation the generated installation scripts are invoked once for each component. Per default custom installation script code added by install(CODE|SCRIPT) only runs for one specific component in this context. The new ALL_COMPONENTS option allows custom script code to be run once for each component being installed.
* cmInstallTargetGenerator: Report namelink mode with list of filesBrad King2021-03-161-0/+1
|
* cmInstallGenerator: Add backtrace to all install generatorsBrad King2021-01-281-2/+1
|
* cmInstallTargetGenerator: Factor out method to get list of target filesBrad King2021-01-281-95/+107
|
* cmInstallTargetGenerator: Avoid duplicating install destination in memoryBrad King2021-01-281-18/+22
|
* cmInstallTargetGenerator: Move internal helper to anonymous namespaceBrad King2021-01-281-13/+15
|
* cmMakefile::GetDefinition: return cmPropVitaly Stakhovsky2020-09-021-3/+3
|
* Single location for cmProp typedefVitaly Stakhovsky2020-06-011-2/+1
|
* cmGeneratorTarget::GetProperty: return cmPropVitaly Stakhovsky2020-04-291-2/+6
|
* cmInstallGenerator: std::string paramsVitaly Stakhovsky2020-01-211-2/+2
| | | | | Several construction parameters converted to std::string Also made a few class members const
* cmInstall*Generator: std::string paramsVitaly Stakhovsky2020-01-211-6/+6
| | | | | Several construction parameters converted to std::string Also made a few class members const
* Merge topic 'install-name-dir-genex'Brad King2019-11-061-2/+4
|\ | | | | | | | | | | | | | | | | | | a0e2e0ca97 Help: Add documentation and release notes for INSTALL_NAME_DIR genex deeab72aae Tests: Add tests for INSTALL_NAME_DIR 3c85f11fed INSTALL_NAME_DIR: Add support for generator expressions 2ec1156b80 Refactor: Generalize cmExportInstallFileGenerator::ReplaceInstallPrefix() Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3989
| * INSTALL_NAME_DIR: Add support for generator expressionsKyle Edwards2019-11-041-2/+4
| |
* | RPATH: Remove stray indent in generated file(RPATH_CHANGE) commandCraig Scott2019-11-041-1/+1
|/
* cmGeneratorExpression: Add cmGeneratorExpression::Evaluate utilityDaniel Eiband2019-09-231-4/+2
| | | | | | | cmGeneratorExpression::Evaluate is a shortcut when only the evaluated string is needed or an instance of cmCompiledGeneratorExpression cannot be cached. Fixes: #19686
* clang-tidy: modernize-deprecated-headersRegina Pfeifer2019-09-161-1/+1
|
* Source sweep: Use cmStrCat for string concatenationSebastian Holtermann2019-08-221-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is generated by a python script that uses regular expressions to search for string concatenation patterns of the kind ``` std::string str = <ARG0>; str += <ARG1>; str += <ARG2>; ... ``` and replaces them with a single `cmStrCat` call ``` std::string str = cmStrCat(<ARG0>, <ARG1>, <ARG2>, ...); ``` If any `<ARGX>` is itself a concatenated string of the kind ``` a + b + c + ...; ``` then `<ARGX>` is split into multiple arguments for the `cmStrCat` call. If there's a sequence of literals in the `<ARGX>`, then all literals in the sequence are concatenated and merged into a single literal argument for the `cmStrCat` call. Single character strings are converted to single char arguments for the `cmStrCat` call. `std::to_string(...)` wrappings are removed from `cmStrCat` arguments, because it supports numeric types as well as string types. `arg.substr(x)` arguments to `cmStrCat` are replaced with `cm::string_view(arg).substr(x)`
* clang-tidy: isolate declarations for readabilityRegina Pfeifer2019-08-201-1/+2
|
* avoid adding multiple consecutive string literals to std::stringRolf Eike Beer2019-08-181-2/+1
| | | | While at it change some single character additions to be of type char.
* clang-tidy: Enable performance-inefficient-string-concatenationSebastian Holtermann2019-08-051-1/+2
| | | | | | | Enables the clang-tidy test performance-inefficient-string-concatenation and replaces all inefficient string concatenations with `cmStrCat`. Closes: #19555
* Property: Add INSTALL_REMOVE_ENVIROMENT_RPATH propertyJiang Yue2019-07-251-2/+8
|
* IWYU: Fix handling of <memory> standard headerBrad King2019-07-101-0/+1
| | | | | | | | An old workaround for `std::allocator_traits<>::value_type` lints from IWYU on `std::vector<>` usage breaks IWYU's handling of `<memory>`. Convert the workaround to use the same approach we already use for a workaround of `std::__decay_and_strip<>::::__type` lints. Then update the `<memory>` inclusions to follow the now-correct IWYU lints.
* cmInstallTargetGenerator: Escape generated OLD_RPATH argumentDennis Klein2019-06-131-2/+3
| | | | | | | On some platforms, e.g. most ELF-based ones, RPATHs may contain keywords that match CMake's variable syntax. To prevent them from being falsely substituted when running the cmake_install.cmake script CMake syntax needs to be escaped.
* cmInstallTargetGenerator: Introduce CMP0095Dennis Klein2019-06-131-9/+67
| | | | | | | Escape coincidental CMake syntax in RPATH entries when generating the intermediary cmake_install.cmake script. Fixes #19225
* Refactor: Allow cmInstallGenerator::Compute() to return an errorKyle Edwards2019-05-131-1/+3
| | | | | | This is preparation for an upcoming merge request, which will add a new cmInstallGenerator that returns false if there are errors in the Compute() step.
* Merge topic 'remove-exclude-from-all-warning'Brad King2019-02-251-16/+0
|\ | | | | | | | | | | | | d3b765d451 EXCLUDE_FROM_ALL: Don't warn if installing target excluded from all Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3002
| * EXCLUDE_FROM_ALL: Don't warn if installing target excluded from allCraig Scott2019-02-211-16/+0
| | | | | | | | | | | | | | | | | | The original warning pre-dates support for install components. There are now legitimate scenarios where an install(TARGETS) command may list a target that is excluded from all, e.g. hierarchical projects that will never install the component such a target belongs to. Fixes: #18938
* | Create and use `cmGeneratorTarget::Names`Saleem Abdulrasool2019-02-111-59/+41
| | | | | | | | | | | | Rather than taking a number of out parameters for the various names, create a structure that is reused for both `GetLibraryNames` and `GetExecutableNames`. Replace uses according to the new interface.
* | cmMakefile::GetRequiredDefinition: return const std::string&Vitaly Stakhovsky2019-02-071-1/+1
|/
* Merge topic 'install-strip-macos'Brad King2019-01-311-1/+13
|\ | | | | | | | | | | | | 20291e8e72 install: Fix stripping on macOS Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2892
| * install: Fix stripping on macOSHarry Mallon2019-01-301-1/+13
| | | | | | | | | | | | | | | | On macOS the `strip` tool requires special arguments depending on the type of binary to be stripped. Fixes: #11367 Fixes: #16499
* | Merge topic 'restore-install-late-framework'Brad King2019-01-311-2/+29
|\ \ | |/ |/| | | | | | | | | | | | | | | f64099cf5e Merge branch 'backport-restore-install-late-framework' 95210d027a macOS: Restore compatibility for setting FRAMEWORK after install() d9dd68cb60 macOS: Restore compatibility for setting FRAMEWORK after install() Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Kyle Edwards <kyle.edwards@kitware.com> Merge-request: !2878
| * macOS: Restore compatibility for setting FRAMEWORK after install()Brad King2019-01-301-2/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `FRAMEWORK` target property affects the way the `install()` command treats the target and so should be set first. Our implementation assumed that this was always the case and led to an assertion failure. Prior to CMake 3.12 this was visible only when using an explicit `LIBRARY ... NAMELINK_ONLY` option, but commit 0212d7c762 (install: add NAMELINK_COMPONENT argument, 2018-04-18, v3.12.0-rc1~139^2~3) made it possible with a simple `LIBRARY DESTINATION`. Fully supporting out-of-order specification will require non-trivial refactoring to defer install generator creation to generate time. For now simply restore the old behavior of installing the framework to the library destination and warn about the case. Fixes: #18848
* | Merge topic 'tidy-use-equals-default'Brad King2019-01-291-3/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 094f01d0f0 cleanup: Prefer compiler provided special member functions 55671b41d2 clang-tidy: Use `= default` Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Brad King <brad.king@kitware.com> Merge-request: !2841
| * | clang-tidy: Use `= default`Regina Pfeifer2019-01-251-3/+1
| | | | | | | | | | | | | | | | | | Suppress some cases in `Source/cmGeneratorExpressionNode.cxx` and `Source/cmUVHandlePtr.h` where a few older compilers require a user-defined default constructor (with `{}`).
* | | cmSystemTools::Message: Add overload accepting std::stringVitaly Stakhovsky2019-01-281-1/+1
| |/ |/|
* | Merge topic 'cmake-files-directory'Brad King2019-01-251-2/+1
|\ \ | |/ |/| | | | | | | | | | | 3e867ed400 cmake: inlined files dir constant and removed it from cmake.h Acked-by: Kitware Robot <kwrobot@kitware.com> Rejected-by: vvs31415 <vstakhovsky@fastmail.com> Merge-request: !2655
| * cmake: inlined files dir constant and removed it from cmake.hBruno Manganelli2019-01-211-2/+1
| |
* | clang-tidy: Pass by valueRegina Pfeifer2019-01-221-4/+4
|/
* Factor out enum MessageType into dedicated headerBruno Manganelli2019-01-161-2/+3
| | | | Reduce the number of files relying on `cmake.h`.