| 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
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This will allow us to re-use any rvalue allocation that is
available, not just from the first argument.
|
| |
|
| |
|
|
|
|
|
| |
Helpers functions related to cmValue semantic are now part of
cmValue.h header.
|
| |
|
| |
|
|
|
|
|
|
|
| |
To avoid ambiguity on std::string assigment between the following two
cmProp cast operators:
* operator const std::string&() const noexcept
* operator cm::string_view() const noexcept
|
| |
|
|
|
|
|
|
| |
To handle safely the values used by CMake variables and properties,
introduce the class cmProp as a replacement from the simple pointer
to std::string instance.
|
|
|
|
|
| |
CMake uses explicit 'this->' style. Using custom clang-tidy check we can
detect and fix places where 'this->' was missed.
|
|\
| |
| |
| |
| |
| |
| | |
0c9cdf30ed cmStringAlgorithms: Add cmStrLen()
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5201
|
| | |
|
|\ \
| |/
|/|
| |
| |
| |
| | |
38928ee3ee cmStringAlgorithms: Add faster cmJoin overloads for strings
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5185
|
| |
| |
| |
| |
| |
| |
| | |
cmJoin() is often used with std::string ranges. Generic implementation
uses std::ostringstream which is not optimal. With strings we can avoid
operator<<() and make much faster implementation. Additional 'initial'
argument is useful for cmStringCommand.cxx:HandleAppendCommand().
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
#pragma once is a widely supported compiler pragma, even though it is
not part of the C++ standard. Many of the issues keeping #pragma once
from being standardized (distributed filesystems, build farms, hard
links, etc.) do not apply to CMake - it is easy to build CMake on a
single machine. CMake also does not install any header files which can
be consumed by other projects (though cmCPluginAPI.h has been
deliberately omitted from this conversion in case anyone is still using
it.) Finally, #pragma once has been required to build CMake since at
least August 2017 (7f29bbe6 enabled server mode unconditionally, which
had been using #pragma once since September 2016 (b13d3e0d)). The fact
that we now require C++11 filters out old compilers, and it is unlikely
that there is a compiler which supports C++11 but does not support
#pragma once.
|
|\
| |
| |
| |
| |
| |
| | |
eaad8072ee cmNonempty: Convenience inlines to check for non-empty string
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5017
|
| | |
|
|/ |
|
|
|
|
|
|
| |
These generator expressions can only be used in link options properties.
These expressions return the arguments respectively for device and host link
step, otherwise return an empty string.
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 adds the following functions to cmStringAlgorithms:
- `cmIsInternallyOn`
- `cmIsNOTFOUND`
- `cmIsOn`
- `cmIsOff`
The implementations were copied from the equivalent functions in cmSystemTools.
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
2f6495e24e cmSystemTools: Remove ExpandListArgument methods
f4f3c68926 Source code: Use cmExpandList instead of cmSystemTools::ExpandListArgument
ff42dec891 cmStringAlgorithms: Add cmExpandList functions
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3682
|
| | |
|
|\ \
| |/
|/|
| |
| |
| |
| | |
935fbe0b04 cmStringAlgorithms: Add cmStrToLong and cmStrToULong
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3681
|
| |
| |
| |
| |
| |
| |
| |
| | |
This adds the following functions to cmStringAlgorithms:
- `cmStrToLong`: moved from `cmSystemTools::StringToLong`
- `cmStrToULong`: moved from `cmSystemTools::StringToULong`
Overloads of the given functions for `std::string` are added as well.
|
|/
|
|
|
| |
- Add `cmRemoveQuotes` function to cmStringAlgorithms
- Remove unused removeQuotes inline functions
|
|
|
|
|
|
|
|
|
|
| |
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 adds the `cmStringAlgorithms.h` header and moves all string functions
from `cmAlgorithms.h` to `cmStringAlgorithms.h`.
|