diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2018-09-22 14:25:21 +0200 |
---|---|---|
committer | Craig Scott <craig.scott@crascit.com> | 2018-09-25 23:46:56 +1000 |
commit | 5ca130e22394978814a9e59418529a7a3e1a61bd (patch) | |
tree | 86e885acf97be74ae4a7b3cfb572e67a338aa67a /Source/cmGeneratorExpression.cxx | |
parent | 1fea56c3bd99be6c7a6bfaa1454ba67e7a04da72 (diff) | |
download | cmake-5ca130e22394978814a9e59418529a7a3e1a61bd.tar.gz |
Refactoring: introduce function to check if a string is a generator expression
Diffstat (limited to 'Source/cmGeneratorExpression.cxx')
-rw-r--r-- | Source/cmGeneratorExpression.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx index 658e9a7cde..2727d9ae40 100644 --- a/Source/cmGeneratorExpression.cxx +++ b/Source/cmGeneratorExpression.cxx @@ -168,7 +168,7 @@ static std::string stripAllGeneratorExpressions(const std::string& input) const char* c = input.c_str() + pos; const char* const cStart = c; for (; *c; ++c) { - if (c[0] == '$' && c[1] == '<') { + if (cmGeneratorExpression::StartsWithGeneratorExpression(c)) { ++nestingLevel; ++c; continue; @@ -243,7 +243,7 @@ static std::string stripExportInterface( const char* c = input.c_str() + pos; const char* const cStart = c; for (; *c; ++c) { - if (c[0] == '$' && c[1] == '<') { + if (cmGeneratorExpression::StartsWithGeneratorExpression(c)) { ++nestingLevel; ++c; continue; @@ -310,7 +310,7 @@ void cmGeneratorExpression::Split(const std::string& input, const char* c = input.c_str() + pos; const char* const cStart = c; for (; *c; ++c) { - if (c[0] == '$' && c[1] == '<') { + if (cmGeneratorExpression::StartsWithGeneratorExpression(c)) { ++nestingLevel; ++c; continue; |