summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileLibraryTargetGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Makefiles: Position target-wide link flags consistently with other generatorsMarc Chevrier2025-10-271-3/+5
| | | | | | | In particular, the `LINK_OPTIONS` target property was not placed on link lines consistently with other generators. Fixes: #27326
* instrumentation: Move target data into content filesMartin Duffy2025-10-021-2/+0
| | | | | | | | | Create a single place to store target data to prevent duplication. This moves `targetType` and `targetLabels` out of the snippet files and into a target map in the `cmakeContent` file referenced by each snippet. Fixes: #27244
* Makefiles: populate the `TARGET_SUPPORT_DIR` replacement variableBen Boeckel2025-07-281-0/+15
|
* cmLocalGenerator: Drop no-op link flag placeholder infrastructureBrad King2025-06-101-4/+2
| | | | | | Revert infrastructure from commit 8bcf9c7a3e (Add support of "LINKER:" prefix for artifact creation flags, 2024-10-12, v4.0.0-rc1~522^2~1). It is not needed to populate legacy placeholders with empty strings.
* Ninja,Makefile: Move builtin linker flags to <LINK_FLAGS> placeholderBrad King2025-06-101-0/+6
| | | | | | | | | | | | | | | Previously we used separate placeholders for builtin linker flags: * CMAKE_<LANG>_LINK_FLAGS for EXECUTABLEs * CMAKE_SHARED_LIBRARY_CREATE_<LANG>_FLAGS for SHARED libraries * CMAKE_SHARED_MODULE_CREATE_<LANG>_FLAGS for MODULE libraries These correspond to variables set by our compiler information modules. Teach the generators to look up these variables and add them to the existing `<LINK_FLAGS>` placeholder instead. Substitute the empty string for the old placeholders. Issue: #21934
* Linker: Generate per-language module -DEF: flags on WindowsBrad King2025-05-281-2/+2
| | | | | | | | | | | | With IntelLLVM on Windows, we link using the compiler driver. With MSVC on Windows, we invoke the linker directly. If we use both in a single build tree, for separate languages, the value of `CMAKE_LINK_DEF_FILE_FLAG` conflicts. Add a per-language `CMAKE_<LANG>_LINK_DEF_FILE_FLAG` variable to avoid the conflict. Preserve the language-agnostic variable for compatibility with projects that reference it. Fixes: #26005
* LICENSE: Replace references to Copyright.txt with LICENSE.rstKitware Robot2025-03-031-1/+1
| | | | | | | | | | ``` git grep -lz 'Copyright.txt or https://cmake.org/licensing ' | while IFS= read -r -d $'\0' f ; do sed -i '/Copyright.txt or https:\/\/cmake.org\/licensing / { s/Copyright.txt/LICENSE.rst/ }' "$f" ; done ```
* instrumentation: Add Config value to snippet dataMartin Duffy2025-02-091-1/+1
|
* Revise C++ coding style using clang-format with "east const"Kitware Robot2025-01-231-9/+9
| | | | | | | | | | | | | | | Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`, now with "east const" enforcement. Use `clang-format` version 18. * 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. Issue: #26123
* instrumentation: Add targetLabels field to link snippetsMartin Duffy2025-01-171-0/+2
| | | | | Adds a new data field `targetLabels` to link snippets which contains a list of text labels from the LABELS target property.
* Add support of "LINKER:" prefix for artifact creation flagsMarc Chevrier2024-11-041-2/+4
| | | | | | | The following variables now support the LINKER: prefix: * CMAKE_SHARED_LIBRARY_CREATE_<LANG>_FLAGS * CMAKE_SHARED_MODULE_CREATE_<LANG>_FLAGS * CMAKE_<LANG>_LINK_FLAGS
* Refactoring cmRulePlaceHolderExpander: propagate cmBuildStep informationMarc Chevrier2024-11-041-2/+3
|
* Add support of "LINKER:" prefix for CMAKE_<TYPE>_LINKER_FLAGS variableMarc Chevrier2024-11-041-3/+6
| | | | | | | | The following variables now support the LINKER: prefix: * CMAKE_<TYPE>_LINKER_FLAGS * CMAKE_<TYPE>_LINKER_FLAGS_<CONFIG> Fixes: #26171
* AIX: Add option to archive shared librariesAditya Vidyadhar Kamath2024-07-171-1/+7
| | | | | | | | Add option `CMAKE_AIX_SHARED_LIBRARY_ARCHIVE`. There will no versions for the shared objects when this option is used. Closes: #26033
* Apple Text Based Stubs: should be usage in subdirectoriesMarc Chevrier2024-03-141-0/+3
| | | | Fixes: #25765
* Makefiles: Add LINK_WHAT_YOU_USE support for MODULE librariesPeter Kokot2023-12-061-0/+3
| | | | | | | This was accidentally left out by Makefile generators. It already works with Ninja. Fixes: #25480
* Add options to specify linker toolMarc Chevrier2023-10-131-0/+3
| | | | | | | | | | | | | | | | | | Offer the capability, through variable `CMAKE_LINKER_TYPE`, as well as the target property `LINKER_TYPE` to specify which linker must be used. The implementation of this capability is specified by variables specific to the language and linker type: `CMAKE_<LANG>_USING_LINKER_<TYPE>`. Some definitions are provided as part of `CMake`. For example, to select the `LLVM` linker rather than the standard one, the type `LLD` should be specified through the variable `CMAKE_LINKER_TYPE`. And, on `Apple`, `Linux` and some environments on `Windows`, the variable `CMAKE_<LANG>_USING_LINKER_LLD` has value `-fuse-ld=lld`. And for `Windows` environments based on `MSVC`, where the linker is used directly, the tool `lld-link.exe` will be used rather than `link.exe`. Fixes: #19174, #24254, #24990
* clang-tidy: Fix readability-redundant-string-cstr warningsBrad King2023-05-221-1/+1
|
* CreateRulePlaceholderExpander(): enhance memory managementMarc Chevrier2023-05-041-4/+4
| | | | This method returns now a std::unique_ptr instance rather than a raw pointer.
* Link step: use linker dependency linker fileMarc Chevrier2023-05-031-0/+3
| | | | | | Based on work done by @ben.boeckel (!8051) Fixes: #22217
* CMake code rely on cmList class for CMake lists management (part. 2)Marc Chevrier2023-04-291-12/+14
|
* CMake code rely on cmList class for CMake lists management (part. 1)Marc Chevrier2023-04-241-1/+2
|
* Merge topic 'dont_use_bom_with_cuda'Brad King2023-03-021-4/+4
|\ | | | | | | | | | | | | | | c5305cf493 Makefile: Don't pass the CUDA compiler response files with UTF8_BOM Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Ivan Katalenić <ivankatalenic100@gmail.com> Merge-request: !8267
| * Makefile: Don't pass the CUDA compiler response files with UTF8_BOMRobert Maynard2023-02-281-4/+4
| | | | | | | | Fixes #24544
* | Apple: Handle generation and comsuption of text-based stubs (.tbd files)Marc Chevrier2023-03-011-6/+96
|/ | | | Fixes: #24123
* RULE_LAUNCH_*: Add support for generator expressionsKyle Edwards2023-02-031-6/+8
|
* Watcom: Fix double-quote to be single-quote in response files for wlinkJiri Malak2023-01-261-1/+1
| | | | | Response files contained double-quote for any response file, but response files for wlink must contains single-quote. This is fix for libraries list response file. Problem for object file list was fixed by MR !8115
* Watcom: Replace WATCOMQUOTE format by UseWatcomQuote attributeJiri Malak2023-01-241-4/+1
| | | | | | | Replace WATCOMQUOTE output format by UseWatcomQuote attribute to properly handle single quote This attribute is used globaly only for Watcom linker to handle single-quote separator instead of double-quote it doesn't mean different output format only change of quoting separator It is now applied to any output form SHELL/RESPONSE/NINJAMULTI if Watcom linker is used otherwise double-quote is used
* CUDA: Add Device LTO support for nvccRobert Maynard2022-07-221-5/+8
| | | | Fixes #22200
* CUDA: Support response files with nvccRobert Maynard2022-06-131-5/+7
|
* cmLocalGenerator: Adopt AppendModuleDefinitionFlag methodBrad King2022-05-311-4/+6
| | | | Migrate from `cmCommonTargetGenerator::AddModuleDefinitionFlag`.
* cmMakefileLibraryTargetGenerator: improve output buildingBen Boeckel2022-05-191-1/+3
| | | | | GCC warns about buffer juggling here. To avoid the warning, improve the code to avoid resizing on the following two pushes.
* CUDA: Ignore USE_WATCOM_QUOTE for device link rulesRaul Tambre2021-11-071-10/+3
| | | | It's useless as the Watcom compiler isn't supported by NVCC.
* Rename cmProp in cmValueMarc Chevrier2021-09-211-6/+6
|
* LINK_WHAT_YOU_USE feature: externalize configurationMarc Chevrier2021-07-091-10/+15
| | | | | | | | Currently, this feature is only supported on ELF platforms. So, the property LINK_WHAT_YOU_USE will be ignored for other plateforms. Moreover, flags and commands are now controled by CMake variables. Fixes: #20174
* Launchers: Support setting linker launchersBobby D Reynolds2021-05-281-0/+6
| | | | Fixes: #18316
* cmLocalGenerator: Factor out relative path conversion helpersBrad King2021-05-131-46/+30
| | | | | | Most calls to `MaybeConvertToRelativePath` use one of our common work directories (e.g. top of the build tree) as the local path. Add helpers for each of the common cases to simplify and clarify call sites.
* Makefiles: Escape SONAME on linker command lineAlexander Stein2021-03-041-1/+4
| | | | | If the shared object name contains spaces, they need to be properly escaped, or link command will fail.
* cmLocalGenerator::GetRuleLauncher: return cmPropvvs314152020-11-021-6/+7
|
* CUDA: Clang separable compilationRaul Tambre2020-09-241-32/+41
| | | | | | | | | | | | For NVCC the compiler takes care of device linking when passed the "-dlink" flag. Clang doesn't support such magic and requires the buildsystem to do the work that NVCC does behind the scenes. The implementation is based on Bazel's device linking documentation: https://github.com/tensorflow/tensorflow/blob/7cabcdf073abad8c46e9dda62bb8fa4682d2061e/third_party/nccl/build_defs.bzl.tpl#L259 Closes: #20726
* cmNonempty: Convenience inlines to check for non-empty stringVitaly Stakhovsky2020-07-141-2/+2
|
* cmMakefile: add GetDefExpandList() that splits value into std::vectorVitaly Stakhovsky2020-05-301-9/+3
| | | | Combines cmMakefile:GetDefinition() and cmExpandList()
* CUDA: Device linking use now link optionsMarc Chevrier2020-04-191-8/+7
| | | | | | | | | | properties LINK_OPTIONS and INTERFACE_LINK_OPTIONS are propagated to the device link step. To control which options are selected for normal link and device link steps, the $<DEVICE_LINK> and $<HOST_LINK> generator expressions can be used. Fixes: #18265
* cmLocalGenerator: Convert GetStaticLibraryFlags to take original-case configBrad King2020-04-011-2/+1
| | | | Move upper-case conversion of the configuration into the implementation.
* cmState::GetTargetTypeName: return type is *cmPropVitaly Stakhovsky2020-03-191-1/+1
|
* AIX: Add an option to disable automatic exports from shared librariesBrad King2020-01-311-0/+3
| | | | | | | | | | Since commit 0f150b69d3 (AIX: Explicitly compute shared object exports for both XL and GNU, 2019-07-11, v3.16.0-rc1~418^2~2) we always export all symbols from shared libraries by default. Add a new target property called `AIX_EXPORT_ALL_SYMBOLS` that can be explicitly set to OFF to suppress this behavior and export no symbols by default. Fixes: #20290
* cmGlobalGenerator: modernize memrory managemenbtMarc Chevrier2019-12-301-6/+6
|
* Refactoring: use append functions from cmext/algorithmMarc Chevrier2019-12-171-5/+5
|
* Refactor: Prepare Ninja generator for multi-configKyle Edwards2019-12-131-44/+48
|
* PCH: Generate sources during Compute stepCristian Adam2019-10-091-2/+0
|