| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
`isspace` takes `int` but documents that the value must be representable
by `unsigned char`, or be EOF. Use a wrapper to cast to `unsigned char`
to avoid sign extension while converting to `int`. This generalizes the
fix from commit 5e8c176e2a (cmExecuteProcessCommand: Cast c to unsigned
char before cast to int, 2024-01-05) to other `isspace` call sites.
This was detected by assertions in the MSVC standard library while
processing UTF-8 text.
Issue: #25561
|
| |
|
|
|
|
|
|
|
| |
Add a query on Windows hosts for the installation prefix of a
MSYS or MinGW development environment.
Issue: #24216
|
| |
|
|
|
|
|
|
| |
`include-what-you-use` diagnostics, in practice, are specific to
the environment's compiler and standard library. Update includes
to satisfy IWYU for our CI job under Debian 12.
|
| |
|
|
|
|
| |
This removes some includes from some existing files.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Rename the booleans 's_ErrorOccured' and 's_FatalErrorOccured' to
's_ErrorOccurred' and 's_FatalErrorOccurred', respectively.
Rename the getters and setters to 'Get[Fatal]ErrorOccurred' and
'Set[Fatal]ErrorOccurred', and fix all uses across the codebase.
|
| |
|
|
|
|
| |
Fixes: #21240, #23367
|
|
|
|
|
|
|
|
|
|
| |
When using the Visual Studio generator for VS 10 or above,
offer this key to get the location of the MSBuild command
before the first `project()` or `enable_language()` command
has finished running.
This will be needed only by one of our own modules, so leave it
undocumented for now.
|
|
|
|
| |
Before it was Linux only.
|
| |
|
|
|
|
| |
If the OS identification was obtained via fallback script.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Also, split `GetValue()` into 2 overloads:
- one used to get documented keys
- the other (different signature) to get `VS_nn_DIR` keys
|
| |
|
| |
|
|
|
|
| |
Fixes: #22339
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
This replaces `std::ostringstream`, when it is written to only once.
If the single written argument was numeric, `std::to_string` is used instead.
Otherwise, the single written argument is used directly instead of the
`std::ostringstream::str()` invocation.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add this generator *without* support for specifying the target
architecture in the generator name. cmake-gui will be taught
to provide a field for this, and command-line builds can use -A.
Also, teach this generator to select a default target architecture
based on the host architecture.
Fixes: #18689
Inspired-by: Egor Pugin <egor.pugin@gmail.com>
|
|
|
|
|
|
| |
Rename `cmGlobalVisualStudio{15 => Versioned}Generator`. Rename
`Factory` to `Factory15` since that part still needs to be
version-specific.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`. Use `clang-format` version 6.0.
* If you reached this commit for a line in `git blame`, re-run the blame
operation starting at the parent of this commit to see older history
for the content.
* See the parent commit for instructions to rebase a change across this
style transition commit.
|
|
|
|
|
|
|
|
|
|
| |
Visual Studio 2017 supports multiple instances installed on a single
machine. We use the Visual Studio Installer tool to enumerate instances
and select one. Once we select an instance for a given build tree, save
the result in `CMAKE_GENERATOR_INSTANCE` so we can re-configure the tree
with the same instance on future re-runs of CMake.
Fixes: #17268
|
|
|
|
|
| |
Extend the `cmake_host_system_information()` command to add processor
identification keywords.
|
| |
|
|
|
|
|
|
| |
Add a query to the `cmake_host_system_information` command to get
the location of a VS 2017 installation. Leave it undocumented and
for internal use for now.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Per-source copyright/license notice headers that spell out copyright holder
names and years are hard to maintain and often out-of-date or plain wrong.
Precise contributor information is already maintained automatically by the
version control tool. Ultimately it is the receiver of a file who is
responsible for determining its licensing status, and per-source notices are
merely a convenience. Therefore it is simpler and more accurate for
each source to have a generic notice of the license name and references to
more detailed information on copyright holders and full license terms.
Our `Copyright.txt` file now contains a list of Contributors whose names
appeared source-level copyright notices. It also references version control
history for more precise information. Therefore we no longer need to spell
out the list of Contributors in each source file notice.
Replace CMake per-source copyright/license notice headers with a short
description of the license and links to `Copyright.txt` and online information
available from "https://cmake.org/licensing". The online URL also handles
cases of modules being copied out of our source into other projects, so we
can drop our notices about replacing links with full license text.
Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority
of the replacements mechanically. Manually fix up shebang lines and trailing
newlines in a few files. Manually update the notices in a few files that the
script does not handle.
|
| |
|
|
|
|
| |
Use istringsream for parsing, ostringstream for generation.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Run the `Utilities/Scripts/clang-format.bash` script to update
all our C++ code to a new style defined by `.clang-format`.
Use `clang-format` version 3.8.
* If you reached this commit for a line in `git blame`, re-run the blame
operation starting at the parent of this commit to see older history
for the content.
* See the parent commit for instructions to rebase a change across this
style transition commit.
|
|
|
|
| |
We no longer need this compatibility layer for the compilers we support.
|
|
|
|
|
|
| |
Use the clang RemoveCStrCalls tool to automatically migrate the
code. This was only run on linux, so does not have any positive or
negative effect on other platforms.
|
|
Expose the internal system information API to the CMake language. For
example, it is useful to see how much memory the system has available to
estimate an upper limit of tests that can run in parallel.
|