| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
Enables the clang-tidy test performance-inefficient-string-concatenation
and replaces all inefficient string concatenations with `cmStrCat`.
Closes: #19555
|
|
|
|
|
| |
This adds the `cmStringAlgorithms.h` header and moves all string functions
from `cmAlgorithms.h` to `cmStringAlgorithms.h`.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Fix the logic added by commit d91b5a72cd (Ninja: Add support for CUDA
nvcc response files, 2019-05-30, v3.15.0-rc1~8^2) to always use the CUDA
compiler response file flag for response files during device linking.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Instead of passing multiple strings to the `WriteRule` and `AddRule` methods
of `cmGlobalNinjaGenerator`, pass only a `cmNinjaRule` instance reference,
that is set up beforehand.
Adapt calls to `WriteRule` and `AddRule` in multiple places.
|
|
|
|
|
|
|
|
| |
The response file was being written but not used due to the wrong
variable being configured for Swift. Swift does compile+link in a
single phase and does not use the `<OBJECTS>` placeholder. Use the
`<SWIFT_SOURCES>` placeholder instead for the response file substitution
which serves the same purpose.
|
|\
| |
| |
| |
| |
| |
| | |
02c14b7fcd Ninja,Swift: pass along DEFINES/FLAGS/INCLUDES
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3355
|
| |
| |
| |
| |
| |
| |
| | |
Since the Swift model does a single compile/link phase, we would not
get the compile definitions, includes, and options past along to the
build of the module. Compute these for the target when constructing
the main command.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
62381effba Ninja,Swift: reuse `SWIFT_MODULE_NAME` for `SWIFT_MODULE`
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3343
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Rather than compute the value of `SWIFT_MODULE`, use the computed value
of `SWIFT_MODULE_NAME`. This is helpful strictly for Windows where you
have multiple configuration variants with differing ABIs that need must
co-exist. In particular, this re-use permits the use of
`CMAKE_DEBUG_POSTFIX` to have the import library and the DLL be named
with the trailing suffix but have the same import name for the swift
module and interface.
|
|\ \ \
| |/ /
|/| |
| | |
| | |
| | |
| | | |
13c92b4a30 Ninja: Fix creation of library symlinks in folders with spaces
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3341
|
| | |
| | |
| | |
| | |
| | | |
The arguments to 'cmake -E cmake_symlink_library' must be properly
quoted.
|
|\ \ \
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
a9180ccf9a Tests: add a check for the Swift compiler
d745551fb6 Help: add some initial documentation for Swift support
9a182c9e5b Auxiliary: update vim syntax highlighting
e9b0063e8e Modules: add build rules for Swift Ninja support
b6412e3e38 Ninja: add placeholders to support Swift build
7d7f31161d Ninja: add support for Swift's output-file-map.json
d688c4c19d Swift: remove unnecessary unreleased Ninja infrastructure
0723582208 Swift: Detect compiler version
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3297
|
| | |
| | |
| | |
| | | |
Add the placeholders needed to support compiling Swift code.
|
| |/
| |
| |
| |
| |
| | |
This cleans up the new options that were added to support Swift. This
was not released, and the proper support approach that we settled upon
does not require as much specialised support.
|
|\ \
| |/
|/|
| |
| |
| |
| |
| | |
23e8364aed Source: std::string related cleanup
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sebastian Holtermann <sebholt@web.de>
Merge-request: !3324
|
| | |
|
|/ |
|
|\
| |
| |
| |
| |
| |
| | |
f83e4359f2 Apple: Preserve high resolution mtime for static libraries
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3283
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
On macOS ranlib truncates the fractional part of the static achive
file modification time. If the archive and at least one contained
object file were created within the same second this will make look
the archive older than the object file. On subsequent ninja runs
this leads to re-achiving and updating dependent targets.
As a work-around we touch the archive after ranlib.
Closes: #19222
|
| |
| |
| |
| |
| | |
Use a `unique_ptr` to manage the lifetime of the `MacOSXContentGenerator`
and 'OSXBundleGenerator` rather than manually handling the lifetime.
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
9dd255548d cmSystemTools::Error: consolidate parameters into single std::string
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2995
|
| | | |
|
|/ /
| |
| |
| |
| |
| | |
This adds the placeholders that are needed to merge the swift partial
modules. It permits generating the rules necessary to actually merge
the partial modules emitted for a partial compilation.
|
| |
| |
| |
| | |
Remove the second reference to the generator target.
|
|/
|
|
|
|
| |
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.
|
|\
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
|
|/ |
|
|
|
|
|
| |
IWYU now correctly requires `<utility>` for `std::move`. It also
requires a container header when used via a range-based for loop.
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
7b74213461 CUDA: Fix crash on linking to a CUDA target without CUDA enabled
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2704
|
| |
| |
| |
| |
| |
| |
| |
| | |
Do not try to device link or add CUDA runtime libraries if the language
is not enabled.
Fixes: #18673
Issue: #18614
|
|/
|
|
|
|
|
|
| |
With the `|| true`, a linker error before running link-what-you-use
would also use the `|| true` fragment and unconditionally succeed. Just
skip the addition since `--lwyu=` ignores the return value anyways.
Fixes #18524
|
|
|
|
|
|
|
| |
In all cases the return value is converted to std::string anyway.
Also remove unnecessary `c_str()` calls in arguments to
`GetRequiredDefinition`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After changing the ``cmGeneratedFileStream`` methods to accept
``std::string const&`` instead of ``const char*`` we don't
need to call ``std::string::c_str`` anymore when passing
a ``std::string`` to a ``cmGeneratedFileStream`` method.
This patch removes all redundant ``std::string::c_str``
calls when passing a string to a ``cmGeneratedFileStream`` method.
It was generated by building CMake with clang-tidy enabled using
the following options:
-DCMAKE_CXX_CLANG_TIDY=/usr/bin/clang-tidy-4.0;-checks=-*,readability-redundant-string-cstr;-fix;-fix-errors
|
|
|
|
| |
Fixes: #17997
|