1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-06-15 08:30:44 +08:00

21 Commits

Author SHA1 Message Date
Marc Chevrier
e08ba229ee CMake code rely on cmList class for CMake lists management (part. 1) 2023-04-24 10:41:10 +02:00
Marc Chevrier
51b0d45d91 cmExpandList and cmExpandLists rely on cmList class 2023-04-23 14:48:36 +02:00
Kyle Edwards
1cca051470 cmStrCat(): allow any argument to be an rvalue string
This will allow us to re-use any rvalue allocation that is
available, not just from the first argument.
2022-12-06 13:54:42 -05:00
Kyle Edwards
beba50bd61 cmStrCat(): optimize when first argument is an rvalue string 2022-11-30 00:05:09 -05:00
Brad King
31f158e4c8 cmStringAlgorithms: Add functions to parse strings to long long integers 2022-09-20 12:00:08 -04:00
Marc Chevrier
edf67dd039 cmValue: add IsInternallyOn methods 2021-09-21 17:14:05 +02:00
Marc Chevrier
e5cd39ca80 cmProp: refactoring: transform alias in class
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.
2021-08-08 16:19:08 +02:00
Ben Boeckel
cdfc4e3195 clang-tidy: fix readability-qualified-auto warnings 2021-01-27 08:45:45 -05:00
Oleksandr Koval
209daa20b2 Code style: add missed explicit 'this->'
CMake uses explicit 'this->' style. Using custom clang-tidy check we can
detect and fix places where 'this->' was missed.
2021-01-05 14:32:36 +02:00
Oleksandr Koval
38928ee3ee cmStringAlgorithms: Add faster cmJoin overloads for strings
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().
2020-09-03 23:25:37 +03:00
Ben Boeckel
24a9fed5d9 IWYU: mark <cstddef> as needed
Newer IWYU is not seeing them as needed for `size_t`.
2020-04-29 11:16:44 -04:00
Regina Pfeifer
f30523d090 clang-tidy: modernize-deprecated-headers 2019-09-16 10:11:13 -04:00
Brad King
de0a2354fc IWYU: Add missing cstddef includes for size_t and nullptr_t
The IWYU tool we use for CI now diagnoses these.
2019-09-03 11:46:52 -04:00
Sebastian Holtermann
5b7650216b cmStringAlgorithms: Add cmIsInternallyOn, cmIsNOTFOUND, cmIsOn, cmIsOff
This adds the following functions to cmStringAlgorithms:

- `cmIsInternallyOn`
- `cmIsNOTFOUND`
- `cmIsOn`
- `cmIsOff`

The implementations were copied from the equivalent functions in cmSystemTools.
2019-08-17 10:58:50 +02:00
Kyle Edwards
2beed5a4ef Merge topic 'cmExpandList'
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
2019-08-16 14:51:03 -04:00
Kyle Edwards
dcf2beb7de Merge topic 'cmStringAlgorithms_ulong'
935fbe0b04 cmStringAlgorithms: Add cmStrToLong and cmStrToULong

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3681
2019-08-16 14:49:28 -04:00
Sebastian Holtermann
ff42dec891 cmStringAlgorithms: Add cmExpandList functions 2019-08-14 16:29:11 +02:00
Sebastian Holtermann
935fbe0b04 cmStringAlgorithms: Add cmStrToLong and cmStrToULong
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.
2019-08-10 14:39:03 +02:00
Sebastian Holtermann
27090096ef cmStringAlgorithms: Add cmRemoveQuotes
- Add `cmRemoveQuotes` function to cmStringAlgorithms
- Remove unused removeQuotes inline functions
2019-08-09 12:20:50 +02:00
Sebastian Holtermann
7fbcc16dcd cmStringAlgorithms: cmIsSpace, cmTrimWhitespace, cmEscapeQuotes, cmTokenize
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`)
2019-08-05 11:25:30 +02:00
Sebastian Holtermann
e5d3ea22d4 cmStringAlgorithms: Add cmCatViews and cmStrCat functions 2019-08-01 11:45:04 +02:00