summaryrefslogtreecommitdiffstats
path: root/Source/cmTargetIncludeDirectoriesCommand.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-02-06 12:18:10 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-02-07 15:21:08 (GMT)
commit92e98dd909bd399f508ff7c2f9657095ddc766cc (patch)
tree37cdba7d39615395842c1a1a0dffb84f1b68fc68 /Source/cmTargetIncludeDirectoriesCommand.cxx
parent1714c27a74c1616e5998a1a51fe42848a1f1c389 (diff)
downloadCMake-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/cmTargetIncludeDirectoriesCommand.cxx')
-rw-r--r--Source/cmTargetIncludeDirectoriesCommand.cxx10
1 files changed, 1 insertions, 9 deletions
diff --git a/Source/cmTargetIncludeDirectoriesCommand.cxx b/Source/cmTargetIncludeDirectoriesCommand.cxx
index eaacfa9..808806a 100644
--- a/Source/cmTargetIncludeDirectoriesCommand.cxx
+++ b/Source/cmTargetIncludeDirectoriesCommand.cxx
@@ -41,14 +41,6 @@ void cmTargetIncludeDirectoriesCommand
}
//----------------------------------------------------------------------------
-static bool isGeneratorExpression(const std::string &lib)
-{
- const std::string::size_type openpos = lib.find("$<");
- return (openpos != std::string::npos)
- && (lib.find(">", openpos) != std::string::npos);
-}
-
-//----------------------------------------------------------------------------
std::string cmTargetIncludeDirectoriesCommand
::Join(const std::vector<std::string> &content)
{
@@ -59,7 +51,7 @@ std::string cmTargetIncludeDirectoriesCommand
it != content.end(); ++it)
{
if (cmSystemTools::FileIsFullPath(it->c_str())
- || isGeneratorExpression(*it))
+ || cmGeneratorExpression::Find(*it) != std::string::npos)
{
dirs += sep + *it;
}