summaryrefslogtreecommitdiffstats
path: root/Source/cmTargetPropCommandBase.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-01-16 21:16:46 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-01-16 21:16:46 (GMT)
commit24dcf0c0072d6e0ca5a1203a54b574d1db9e5a7d (patch)
treecacca4c12f156515950361d8333ad7880db43711 /Source/cmTargetPropCommandBase.cxx
parentc2ab74acb9230d9218091d3fb5e87b6065f98e0b (diff)
downloadCMake-24dcf0c0072d6e0ca5a1203a54b574d1db9e5a7d.zip
CMake-24dcf0c0072d6e0ca5a1203a54b574d1db9e5a7d.tar.gz
CMake-24dcf0c0072d6e0ca5a1203a54b574d1db9e5a7d.tar.bz2
Make sure generator expressions can be used with target_include_directories.
Handle the case that a generator expression is used before treating a non-target as an error.
Diffstat (limited to 'Source/cmTargetPropCommandBase.cxx')
-rw-r--r--Source/cmTargetPropCommandBase.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/cmTargetPropCommandBase.cxx b/Source/cmTargetPropCommandBase.cxx
index 69aaf17..7f15dcb 100644
--- a/Source/cmTargetPropCommandBase.cxx
+++ b/Source/cmTargetPropCommandBase.cxx
@@ -66,6 +66,14 @@ bool cmTargetPropCommandBase
}
//----------------------------------------------------------------------------
+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);
+}
+
+//----------------------------------------------------------------------------
bool cmTargetPropCommandBase
::ProcessContentArgs(std::vector<std::string> const& args,
unsigned int &argIndex, bool prepend)
@@ -105,6 +113,10 @@ bool cmTargetPropCommandBase
content += sep + "$<TARGET_PROPERTY:" + args[i]
+ ",INTERFACE_" + this->Property + ">";
}
+ else if(isGeneratorExpression(args[i]))
+ {
+ content += sep + args[i];
+ }
else if (!this->HandleNonTargetArg(content, sep, args[i], args[0]))
{
return false;