diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-01-16 21:16:46 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-01-16 21:16:46 (GMT) |
commit | 24dcf0c0072d6e0ca5a1203a54b574d1db9e5a7d (patch) | |
tree | cacca4c12f156515950361d8333ad7880db43711 /Source | |
parent | c2ab74acb9230d9218091d3fb5e87b6065f98e0b (diff) | |
download | CMake-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')
-rw-r--r-- | Source/cmTargetPropCommandBase.cxx | 12 |
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; |