| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Fixes: #23224
|
|
|
|
|
|
| |
* Extend Visual Studio solution parser for reading build target
* Map solution build target to project build target (especially for Any CPU)
* Use C++ <optional> template instead of pointer return value for cmSlnData::GetProjectByGUID
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Add fields to the VS generator to select a target framework.
Migrate the existing default for VS 12 .NET CF for Windows CE.
Report the values in `CMAKE_VS_*` variables and use them for
the CSharp compiler id project too.
Issue: #22849
|
|
|
|
|
| |
Add a way to find MSBuild before the main `FindMakeProgram` code path
has executed.
|
|
|
|
| |
While at it, convert to inline initialization.
|
|
|
|
|
| |
Update documentation to mark the generator deprecated. Add a warning at
the end of generation plus an option to turn off the warning.
|
|
|
|
| |
Fixes: #22339
|
|
|
|
|
|
|
|
|
|
|
| |
Since commit 887e9df0c7 (VS: Update v142 CL flag table for VS 16.10,
2021-06-04) we map several `/external:*` flags to their corresponding
`.vcxproj` elements. These elements were added to `cl.xml` in VS 16.10,
so filter them out in older VS versions. Add a field to the json flag
table format to specify the minimum version of VS needed for a given
mapping.
Issue: #22308
|
|
|
|
| |
This makes the values more readable.
|
|
|
|
|
|
|
|
|
|
| |
Since commit 9054cd05e6 (VS: Add flag table entries for '/external:W*'
flags in VS 16.10, 2021-05-28, v3.20.4~10^2) we map flags to the
`ExternalWarningLevel` element. VS 16.9 does not support that element,
but its `cl` compiler does support the `/external:W*` flags. Filter out
the flag table entry on older VS versions.
Fixes: #22308
|
| |
|
|
|
|
|
|
|
| |
Tell `MSBuild` to use the same `Platform` that we generate into the
`VCTargetsPath` detection project.
Fixes: #22068
|
|
|
|
|
|
|
|
|
|
|
| |
The names and formats of our VS flag tables are internal implementation
details. However, some institutions need to maintain support for
non-public VS platforms and toolsets. Provide a hook that their
projects can use to load custom flag table files. This helps avoid
distributing a custom CMake package within such institutions.
Document the hook itself, but explicitly specify that the files the
hook loads are not considered a stable interface.
|
|
|
|
| |
Fixes: #21170
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
30c835428f VS: Accept and translate '-T version=' values with three components
58a50a3a0a VS: Fix '-T version=14.28' under VS 16.9
09f59da7f0 cmGlobalVisualStudioVersionedGenerator: Clarify local variable name
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5903
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
CMake accepts the toolset version that is default in the current VS
version by matching the name later VS versions will use for the SxS
props files. It predicts the future name based on the first two
components of the current VS version's default toolset. However, this
heuristic breaks naming the VS 16.8 toolset version 14.28 under VS 16.9
because the latter's default toolset version is 14.28.29910, which did
not increment the second version component (unprecedented in VS).
Fix this by always using the requested version's SxS props file when it
exists, even if it matches the first two components of the current VS
version's default toolset. Also add a special case for the name VS
16.10 will use for VS 16.9's default toolset, so that it can be used
with VS 16.9 too.
Fixes: #21922
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
The default toolset names are always canonical.
|
| | |
|
| | |
|
| | |
|
| | |
|
|/
|
|
| |
Migrate them from `cmVisualStudio10ToolsetOptions`.
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixes: #20666
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
9135954e2f VS: Do not use native unity builds on VS 2017 versions less than 15.8
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4324
|
| |
| |
| |
| |
| |
| |
| |
| | |
VS 2017 version 15.8 introduced support for unity builds implemented
in part by the `$(VCTargetsPath)/Microsoft.Cpp.Unity.targets` file.
Do not enable unity builds on VS 15 versions that do not have that file.
Fixes: #20284
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
Fixes: #19708
|
|/
|
|
|
| |
Extend the `cmGlobalGenerator::SetGeneratorToolset` signature to
indicate when it is called from `cmake::build`.
|
|
|
|
|
| |
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.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
25f29b9741 cuda: Adapted tests to work with modified cuda toolset
ee86770a3f cuda: Added docs for extended cuda toolset
0ad180d712 cuda: Extend cuda compiler detection to work with custom cuda path
55b0532128 cuda: Extend vs10 target generator to use custom cuda path
df0247a371 cuda: Extend toolset argument to accept path
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3713
|
| |
| |
| |
| |
| |
| |
| |
| | |
Previously cuda could only be used with cmake if it is
installed globally on the system. Sometimes this is not
possible (eg docker, packaging with conan, etc.).
Thus the cuda toolset argument is extended to take
a path to a cuda install directory.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|