diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2019-07-31 07:06:04 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2019-08-05 09:25:30 (GMT) |
commit | 7fbcc16dcd92a80eb30baab93388a0b8e294969b (patch) | |
tree | 33958836b22312caaa67cd3eb331c5676e2cf8a7 /Source/cmMakefile.cxx | |
parent | 3ebd3fa51d229e0067e8ca24f8fa4ed35ee5dac8 (diff) | |
download | CMake-7fbcc16dcd92a80eb30baab93388a0b8e294969b.zip CMake-7fbcc16dcd92a80eb30baab93388a0b8e294969b.tar.gz CMake-7fbcc16dcd92a80eb30baab93388a0b8e294969b.tar.bz2 |
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`)
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 8188ffa..3d42b69 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -2166,8 +2166,7 @@ cmSourceGroup* cmMakefile::GetOrCreateSourceGroup(const std::string& name) if (delimiter == nullptr) { delimiter = "\\"; } - return this->GetOrCreateSourceGroup( - cmSystemTools::tokenize(name, delimiter)); + return this->GetOrCreateSourceGroup(cmTokenize(name, delimiter)); } /** @@ -2659,7 +2658,7 @@ MessageType cmMakefile::ExpandVariablesInStringOld( if (const char* val = this->GetDefinition(var)) { // Store the value in the output escaping as requested. if (escapeQuotes) { - source.append(cmSystemTools::EscapeQuotes(val)); + source.append(cmEscapeQuotes(val)); } else { source.append(val); } @@ -2823,7 +2822,7 @@ MessageType cmMakefile::ExpandVariablesInStringNew( // Get the string we're meant to append to. if (value) { if (escapeQuotes) { - varresult = cmSystemTools::EscapeQuotes(value); + varresult = cmEscapeQuotes(value); } else { varresult = value; } @@ -2949,7 +2948,7 @@ MessageType cmMakefile::ExpandVariablesInStringNew( } if (escapeQuotes) { - varresult = cmSystemTools::EscapeQuotes(varresult); + varresult = cmEscapeQuotes(varresult); } // Skip over the variable. result.append(last, in - last); |