| 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.
|
|\
| |
| |
| |
| |
| |
| | |
7847fef510 VS: Fix access violation when calling Visual Studio macro
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3853
|
| |
| |
| |
| | |
Fixes: #19730
|
|/
|
|
|
|
|
| |
cmGeneratorExpression::Evaluate is a shortcut when only the evaluated string is
needed or an instance of cmCompiledGeneratorExpression cannot be cached.
Fixes: #19686
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)`
|
|
|
|
|
|
|
|
|
| |
This replaces invocations of
- `cmSystemTools::IsInternallyOn` with `cmIsInternallyOn`
- `cmSystemTools::IsNOTFOUND` with `cmIsNOTFOUND`
- `cmSystemTools::IsOn` with `cmIsOn`
- `cmSystemTools::IsOff` with `cmIsOff`
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This adds the following functions to `cmStringAlgorithms`:
- `cmIsSpace`
- `cmTrimWhitespace` (moved from `cmSystemTools::TrimWhitespace`)
- `cmEscapeQuotes` (moved from `cmSystemTools::EscapeQuotes`)
- `cmTokenize` (moved from `cmSystemTools::tokenize` and adapted to
accept `cm::string_view`)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changes `cmMakefile::AddDefinition` to take a `cm::string_view` as value
argument instead of a `const char *`.
Benefits are:
- `std::string` can be passed to `cmMakefile::AddDefinition` directly without
the `c_str()` plus string length recomputation fallback.
- Lengths of literals passed to `cmMakefile::AddDefinition` can be computed at
compile time.
In various sources uses of `cmMakefile::AddDefinition` are adapted to avoid
`std::string::c_str` calls and the `std::string` is passed directly.
Uses of `cmMakefile::AddDefinition`, where a `nullptr` `const char*` might
be passed to `cmMakefile::AddDefinition` are extended with `nullptr` checks.
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
db02be85a0 VS: Provide the default platform name to project code
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3246
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The value of `CMAKE_VS_PLATFORM_NAME` is computed by Visual Studio
generators based on `CMAKE_GENERATOR_PLATFORM` or some default.
Prior to the VS 2019 generator, the default was always `Win32`.
However, for the `Visual Studio 16 2019` generator, the default is
based on the host platform.
Store the default in a new `CMAKE_VS_PLATFORM_NAME_DEFAULT` variable for
use by project code. This is particularly useful in toolchain files
because they are allowed to set `CMAKE_GENERATOR_PLATFORM` and so
`CMAKE_VS_PLATFORM_NAME` is not yet known. Of course the toolchain file
author knows whether it will set `CMAKE_GENERATOR_PLATFORM`, and if not
then `CMAKE_VS_PLATFORM_NAME_DEFAULT` provides the platform name that
will be used.
Fixes: #19177
|
| |
| |
| |
| |
| | |
In various places `///!` was used to start a comment line. This is not valid
Doygen syntax. This patch replaces `///!` comment starts with `//!`.
|
| |
| |
| |
| | |
Fixes: #16136
|
|/ |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
66801f4d40 cmake: Add tests for verbose output to --build mode
439fe2e253 cmake: Add options for verbose output to --build mode
638667efa2 cmake: cmcmd.cxx fix "The arguments are" comments
3ca4402966 ctest: Fix --build-and-test without --build-target on Xcode
cb6c233ecc cmake: Add -hideShellScriptEnvironment xcodebuild option
1a45266cb5 cmGlobalGenerator: Add a class that represent the build command
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2708
|
| |
| |
| |
| |
| |
| | |
This refactors a std::vector<std::string> into a class so that
we can extend the features to represent things such as multiple
chained commands in the future.
|
|/ |
|
|
|
|
| |
Reduce the number of files relying on `cmake.h`.
|
|
|
|
|
| |
We no longer support any VS versions that pre-date support for
multiple platforms (target architectures).
|
|
|
|
|
|
| |
Make the constructors protected since they should be produced through
factories. Also rename `platform{ => InGenerator}Name` to clarify
the meaning of the argument.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
b9c6f08276 Help: Add release note for fileapi feature
4b6b2a571c fileapi: extend codemodel v2 with directory details
eb8c7676a4 fileapi: extend codemodel v2 with a project model
42f0125ceb fileapi: Add test for cmakeFiles v1
6615408193 fileapi: add cmakeFiles v1
3f6ee75a66 fileapi: Add test for cache v2
7489e95b8e fileapi: add cache v2
ea0a060168 fileapi: Add test for codemodel v2
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2706
|
| | |
|
|/
|
|
|
|
| |
Convert from char* to std::string in flag tables.
Change termination condition from nullptr to empty string in command flag.
Update tables to store empty strings.
|
|
|
|
| |
Use the new IsOn(),IsOff() overloads.
|
| |
|
| |
|
|
|
|
|
|
|
| |
While we already support `cmake --build . -- -j`, the options after `--`
are specific to the native build tool. Add new options `--parallel
[<N>]` and `-j [<N>]` to abstract this and map to the proper option
for the native build tool.
|
|
|
|
| |
This generator has been deprecated since CMake 3.9. Remove it.
|
|
|
|
| |
Use `auto` for complex types.
|
|
|
|
| |
Signed-off-by: Matthias Maennich <matthias@maennich.net>
|
| |
|
| |
|
|
|
|
|
|
| |
Visual Studio 2017 Update 3 adds a SolutionGuid to its `.sln` files.
Fixes: #17041
|
|
|
|
|
|
|
|
|
|
|
| |
None of these usages of `std::list` were inserting or removing elements
in the middle of the structure, so there were no benefits to using it.
Other uses were related to C pointers being stable in a list of strings
whereas in a vector of strings, small pointer optimizations could be
moved and become invalid after a modification to the hosting vector.
None of these uses modified the vector after handing out a C string to
an external store.
|
|
|
|
|
| |
Update documentation to mark the generator deprecated. Add a warning at
the end of generation plus an option to turn off the warning.
|
|
|
|
| |
This generator has been deprecated since CMake 3.6. Remove it.
|
|
|
|
|
| |
We no longer support the VS 7.0 (.NET 2002) IDE, so drop the enumeration
value corresponding to its version.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Automate with:
git grep -l '#include <cm_' -- Source \
| xargs sed -i 's/#include <\(cm_.*\)>/#include "\1"/g'
git grep -l '#include <cmsys/' -- Source \
| xargs sed -i 's/#include <\(cmsys\/.*\)>/#include "\1"/g'
git grep -l '#include <cm[A-Z]' -- Source \
| xargs sed -i 's/#include <\(cm[A-Z].*\)>/#include "\1"/g'
|
| |
|
|
|
|
|
|
| |
Comments that indicate a special include order is necessary because
GetCurrentDirectory might get redefined are outdated. Remove those
outdated comments and use the normal ordering of includes.
|
|
|
|
| |
Fixes: #16469
|
|
|
|
|
| |
Add a `CMAKE_VS_INCLUDE_PACKAGE_TO_DEFAULT_BUILD` variable to control
this behavior.
|
|
|
|
|
|
| |
The switch to use UTF-8 encoding has been defaulted to on for quite some
time since commit v3.2.0-rc1~116^2 (Encoding: Switch to use UTF-8
internally by default on Windows, 2014-12-26).
|