diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-02-06 12:18:10 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-02-07 15:21:08 (GMT) |
commit | 92e98dd909bd399f508ff7c2f9657095ddc766cc (patch) | |
tree | 37cdba7d39615395842c1a1a0dffb84f1b68fc68 /Source/cmGeneratorExpression.cxx | |
parent | 1714c27a74c1616e5998a1a51fe42848a1f1c389 (diff) | |
download | CMake-92e98dd909bd399f508ff7c2f9657095ddc766cc.zip CMake-92e98dd909bd399f508ff7c2f9657095ddc766cc.tar.gz CMake-92e98dd909bd399f508ff7c2f9657095ddc766cc.tar.bz2 |
Deduplicate the isGeneratorExpression method.
This API seems like the most appropriate.
Diffstat (limited to 'Source/cmGeneratorExpression.cxx')
-rw-r--r-- | Source/cmGeneratorExpression.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx index 7add1bf..c9f784b 100644 --- a/Source/cmGeneratorExpression.cxx +++ b/Source/cmGeneratorExpression.cxx @@ -365,3 +365,16 @@ std::string cmGeneratorExpression::Preprocess(const std::string &input, assert(!"cmGeneratorExpression::Preprocess called with invalid args"); return std::string(); } + +//---------------------------------------------------------------------------- +std::string::size_type cmGeneratorExpression::Find(const std::string &input) +{ + const std::string::size_type openpos = input.find("$<"); + if (openpos != std::string::npos + && input.find(">", openpos) != std::string::npos) + { + return openpos; + } + } + return std::string::npos; +} |