Commit Graph

11 Commits

Author SHA1 Message Date
Alex Turbov
689eeb67cb string: Add JOIN subcommand
This is just like CONCAT but accepts a glue string to put between
each value.  `JOIN ""` is equivalent to `CONCAT`.
2018-02-16 10:04:47 -05:00
Bernhard M. Wiedemann
014ad2989c Timestamp: support %A and %B
These are defined both by [1] and [2] to give full names of a weekday
and month.

[1] http://pubs.opengroup.org/onlinepubs/009695399/functions/strftime.html
[2] https://msdn.microsoft.com/de-de/library/fe06s4ak.aspx
2017-09-07 13:36:11 -04:00
Sylvain Joubert
d8ecc25457 Add PREPEND sub-command to string command 2017-08-11 13:26:33 +02:00
Ben Boeckel
b794164143 cmStringCommand: clear intermediate matches
When `string(REGEX REPLACE)` or `string(REGEX MATCHALL)` loop
internally, they store their matches, but they do not clear the previous
match from an earlier iteration. This can leave the contents of
`CMAKE_MATCH_<N>` with bogus values for later matches in the string if
they have groups which earlier matched a non-empty string, but now match
an empty string.

Fixes #17079.
2017-07-21 09:09:56 -04:00
Bernhard M. Wiedemann
6c54f7b365 string: Teach TIMESTAMP to treat %% as %
This encoding is documented by `strptime`.
2017-01-27 09:25:37 -05:00
Bernhard M. Wiedemann
243aed525a cmTimestamp: Support SOURCE_DATE_EPOCH to override current time
See https://reproducible-builds.org/ for why this is good and
https://reproducible-builds.org/specs/source-date-epoch/ for the
definition of this variable.
2017-01-26 10:21:41 -05:00
Daniel Pfeifer
2b18cdcaba string: add APPEND subcommand 2015-07-07 09:23:21 -04:00
Justin Borodinsky
1f77a7001b file: Teach STRINGS to support UTF-16 and UTF-32 encodings 2015-01-27 11:30:26 -05:00
Ben Boeckel
7878d06189 test: add a test for clearing regex results 2014-12-03 11:06:44 -05:00
Nils Gladitz
328e869433 StringUuid: Implement new string(UUID) sub-command. 2014-08-28 15:13:54 +02:00
Brad King
4e184a21be string: Add CONCAT sub-command
Add a string(CONCAT) command to simply concatenate input arguments
together.  This will be useful for combining strings from different
quoting syntaxes.  Add a RunCMake.string test covering these cases.
2013-10-21 12:54:20 -04:00