17 Commits

Author SHA1 Message Date
Marc Chevrier
3fdae5acaa Genex: Add generator expressions $<DEVICE_LINK> and $<HOST_LINK>
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.
2020-04-19 15:04:54 +02:00
Kitware Robot
ed98209ddc Revise include order using clang-format-6.0
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.
2019-10-01 12:26:36 -04:00
Marc Chevrier
c688b401d3 cmstd: Modernize CMake system headers
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
2019-09-20 10:01:37 -04:00
Regina Pfeifer
f30523d090 clang-tidy: modernize-deprecated-headers 2019-09-16 10:11:13 -04:00
Regina Pfeifer
62e5f72289 clang-tidy: Replace typedef with using 2019-09-03 13:21:26 -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
75cf7ec263 cmStringAlgorithms: Modernize cmWrap using cm::string_view 2019-08-01 11:45:04 +02:00
Sebastian Holtermann
e5d3ea22d4 cmStringAlgorithms: Add cmCatViews and cmStrCat functions 2019-08-01 11:45:04 +02:00
Sebastian Holtermann
a7d0fe9c24 cmStringAlgorithms: Simplify cmJoin using cm::string_view 2019-08-01 10:38:12 +02:00
Sebastian Holtermann
541361a58b cmStringAlgorithms: Simplify cmStrCmp using cm::string_view 2019-08-01 10:38:12 +02:00
Sebastian Holtermann
f71f7ce3f0 cmStringAlgorithms: Move string functions to the new cmStringAlgorithms.h
This adds the `cmStringAlgorithms.h` header and moves all string functions
from `cmAlgorithms.h` to `cmStringAlgorithms.h`.
2019-07-29 21:13:56 +02:00