| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
The unity build sources need to be added for all generators. Create
them during `cmGlobalGenerator::Compute` to avoid duplicating the calls
in every generator. We already handle Qt autogen there too.
Issue: #19789
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Provide a standardized way to handle the C++ "standard" headers
customized to be used with current CMake C++ standard constraints.
Offer under directory `cm` headers which can be used as direct
replacements of the standard ones. For example:
#include <cm/string_view>
can be used safely for CMake development in place of the `<string_view>`
standard header.
Fixes: #19491
|
|
|
|
|
| |
Update call sites to ensure the `std::string` argument can be
constructed safely.
|
| |
|
|
|
|
| |
Co-Author: Daniel Pfeifer <daniel@pfeifer-mail.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)`
|
|
|
|
| |
While at it change some single character additions to be of type char.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Enables the clang-tidy test performance-inefficient-string-concatenation
and replaces all inefficient string concatenations with `cmStrCat`.
Closes: #19555
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
7ff9ab3b10 Makefile: De-duplicate executable link rule lookup
79f5ef19fe De-duplicate checks for whether a platform uses Windows DLLs
22d3eb5d5e Refactor checks for whether a target has an import library
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3550
|
| |
| |
| |
| | |
Use `GetCreateRuleVariable` instead of duplicating the variable lookup.
|
|/ |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Checks added in commit 81b4d10d8f (CUDA: More exhaustive checks to
determine when to do device linking, 2019-05-09, v3.15.0-rc1~82^2)
assumed that CUDA properties would be set only if CUDA is enabled.
We cannot do a device link step if we do not have the CUDA language
enabled. This was discovered as some projects unconditionally set CUDA
properties such as `CUDA_RESOLVE_DEVICE_SYMBOLS` even when the CUDA
language has not been enabled.
Fixes: #19432
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| | |
81b4d10d8f CUDA: More exhaustive checks to determine when to do device linking
3205c7c950 cmNinjaLinkLineDeviceComputer now lives in the correct source file
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3320
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously CMake used fairly naive logic to determine when to do
device linking which caused unnecessary device linking to occur
frequently. We now use a more exhaustive algorithm to determine
when we have a need for device linking.
Fixes: #19238
|
|\ \
| |/
|/|
| |
| |
| |
| |
| | |
23e8364aed Source: std::string related cleanup
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sebastian Holtermann <sebholt@web.de>
Merge-request: !3324
|
| | |
|
|/
|
|
|
|
|
| |
By using a `std::set<std::string>` container instead of a
`std::vector<std::string>` container, the clean files list becomes sorted and
unique. The clean target in Makefiles beomes nicer and better readable this
way. Also double clean entries won't appear anymore.
|
|
|
|
|
| |
Use a `unique_ptr` to manage the lifetime of the `MacOSXContentGenerator`
and 'OSXBundleGenerator` rather than manually handling the lifetime.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
`CUDA_RESOLVE_DEVICE_SYMBOLS` can be used with shared, module, and
executable target types. This relaxation is to allow for better
interoperability with linkers that automatically do CUDA device symbol
resolution and have no way to disable it.
|
| |
|
|
|
|
|
| |
IWYU now correctly requires `<utility>` for `std::move`. It also
requires a container header when used via a range-based for loop.
|
|
|
|
|
|
|
|
| |
Do not try to device link or add CUDA runtime libraries if the language
is not enabled.
Fixes: #18673
Issue: #18614
|
| |
|
|
|
|
| |
Fixes: #17997
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This family enable to manage link flags
Three new properties:
* directory property: LINK_OPTIONS
* target properties: LINK_OPTIONS and INTERFACE_LINK_OPTIONS
Two new commands
* add_link_options(): to populate directory property
* target_link_options(): to populate target properties
Fixes: #16543
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Change some functions to take `std::string` instead of
`const char*` in the following classes: `cmMakeFile`, `cmake`,
`cmCoreTryCompile`, `cmSystemTools`, `cmState`, `cmLocalGenerator`
and a few others.
* Greatly reduce using of `const char*` overloads for
`cmSystemTools::MakeDirectory` and `cmSystemTools::RelativePath`.
* Remove many redundant `c_str()` conversions throughout the code.
|
|
|
|
|
| |
- Use `std::move` while inserting temporary results into vectors.
- Change `push_back` to `emplace_back` where appropriate.
|
|
|
|
|
|
|
|
| |
The 'requires' step was used to provide implicit dependencies between
the generated Fortran module files and a Fortran target that needs these
module files to ensure the correct compilation order. After recent
refactoring to resolve all dependencies explicitly through `.mod.stamp`
make targets, the separate 'requires' step is not needed anymore.
|
|
|
|
| |
Signed-off-by: Matthias Maennich <matthias@maennich.net>
|
|\
| |
| |
| |
| |
| |
| | |
3bbe95f5 Clean up iwyu code to not be one big if statement.
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1247
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit changes the internal -E__run_iwyu to be -E__run_co_compile. This
is used for co-compile commands. These are tools that want to mirror the
compiler. For each compiler invocation the tool will be invoked first. This
started as a way to implement include what you use (iwyu), but has expanded
to include cpplint, cppcheck and others. Likely there will be more in the
future as well. This commit implements each one in its own function and
provides a way to add additional ones in the future with less work.
|
|/
|
|
|
|
| |
Changes done via `clang-tidy` with some manual fine-tuning
for the variable naming and `auto` type deduction
where appropriate.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using a compiler to drive linking we add compiler flags from
`CMAKE_<LANG>_FLAGS` in case they affect the way the compiler invokes
the linker, but we don't add flags from other places that are meant only
for compiling sources. Rather than calling the `AddLanguageFlags`
method (which is used to add flags for compiling sources) directly, add
an intermediate method that is used when adding the flags for linking.
This will give us a way to add language-specific compiler flags needed
when driving the linker in the same place on the command line as other
compiler flags go.
|
| |
|
|
|
|
|
| |
The method implementation is now only one call of another method, so
inline it at call sites and remove it.
|
| |
|
|
|
|
|
| |
Named enumeration values are much clearer at call sites and add more
type safety.
|
|
|
|
|
|
|
| |
Use `cmGeneratorTarget::ModuleDefinitionInfo` to combine the
implementation of `WINDOWS_EXPORT_ALL_SYMBOLS` with that of using a
`.def` file as a source. Only one of these could be used within a
single target before anyway.
|
| |
|
|
|
|
| |
These files are meaningful only to the host linker.
|