| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
cmGeneratorExpression::Evaluate is a shortcut when only the evaluated string is
needed or an instance of cmCompiledGeneratorExpression cannot be cached.
Fixes: #19686
|
|
|
|
|
|
| |
The quiet flag is false for all but one call to Evaluate. Make the quiet flag
a setter of cmCompiledGeneratorExpression to be able to remove it from the
Evaluate function signature.
|
|\
| |
| |
| |
| |
| |
| |
| | |
4a08690ccf cmstd: Extend header <cm/iterator>
c688b401d3 cmstd: Modernize CMake system headers
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3776
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
|
| |
Use memorized `this->ConfigName` instead of retrieving the value of property
CMAKE_BUILD_TYPE.
|
| |
|
|
|
|
|
|
|
|
| |
The Intel Fortran compiler supports an extension that allows conditional
compilation based on preprocessor definitions specified on the command
line even when not preprocessing.
Fixes: #19664
|
|
|
|
| |
Co-Author: Daniel Pfeifer <daniel@pfeifer-mail.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This replaces the code pattern
```
std::vector<std::string> args;
cmExpandList(valueStr, args, ...)
```
with
```
std::vector<std::string> args = cmExpandedList(valueStr, ...)
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)`
|
| |
|
|
|
|
|
|
|
| |
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`.
|
|
|
|
|
|
|
|
|
|
| |
When building the output-map-file.json, do not convert the path to a
Ninja path, which will make it relative. If `cmake` is invoked with the
`-B` option the files will be written relative to the directory where
CMake was invoked rather than relative to the build tree. This path
need not be a relative path since it is used internally by CMake to
determine where to write the output map file. This allows the use of
`-B` option in CMake in projects with Swift targets.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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 first entry in the compiler launcher command argument list is
the command itself and should be converted to the shell's native
command syntax (e.g. backslashes on Windows).
Without this, the `RunCMake.CompilerLauncher` test fails on Windows
when there are *no* spaces in the path to `cmake.exe`.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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 an emitter for the Swift's output-map-file.json to emit the
requisite support files for Swift compilation. This additionally
prevents the build rules for the object file emission as well to
properly support the Swift build semantics.
|
| |
| |
| |
| |
| |
| | |
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
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Use a `unique_ptr` to manage the lifetime of the `MacOSXContentGenerator`
and 'OSXBundleGenerator` rather than manually handling the lifetime.
|
|
|
|
|
| |
If the compile rule also needs a depfile, the names now no longer
collide.
|
|
|
|
|
| |
Now that preprocessing outputs are not necessarily used all the way
through, the output name is a better base name to use for these files.
|
|
|
|
|
| |
Not all languages compile the preprocessed source (or even have
preprocessed sources at all).
|
|
|
|
|
|
| |
In Fortran, this is OK, but for C++, compiling preprocessed source
generally results in poorer diagnostic messages and can also be
ill-formed anyways.
|
| |
|
|
|
|
|
| |
A target may have multiple languages with dyndep rules, separate `.dd`
files should be generated.
|
|
|
|
|
|
|
|
|
|
|
| |
When building a swift object, we emit a partial swiftmodule and swiftdoc
that must be merged at the end. However, in order to do that, we need
to enumerate the swiftmodules and swiftdocs. As a result, the path must
be known to CMake. Rather than hardcoding the rules into CMake, create
a source property that we can query. This will allow us to create a
final placeholder to emit the merge rule.
Issue: #18800
|
|\
| |
| |
| |
| |
| |
| | |
157570b5a2 Add placeholder for Swift's library name
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2902
|
| |
| |
| |
| |
| |
| |
| | |
This allows us to set the proper link name for the Swift library
(soname). Because this needs to be passed to the object being compiled,
we need to create a new placeholder so that it can be sent along to the
frontend. Default to the target name unless it is explicitly provided.
|
|\ \
| |/
|/|
| |
| |
| |
| |
| |
| |
| | |
d80ecba5c2 Fortran: Fix submodule file names across compilers
72057d9c15 Fortran: Thread compiler id through to internal Fortran parser
7ae329e2ed Fortran: Factor out .mod and .smod file name construction
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Michael Hirsch, Ph.D. <michael@scivision.co>
Merge-request: !2958
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The naming convention for submodule files varies across compilers. Add
a table to the compiler information modules and thread the information
through to the Fortran module dependency parser. Fill out the table for
compiler ids known to support Fortran submodules.
Fixes: #18746
|
|/ |
|