From 08cb4fa4c0378468fc2757666701617f6fe8270e Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Tue, 18 Sep 2012 13:57:07 +0200 Subject: Process generator expressions in the INCLUDE_DIRECTORIES property. This use of generator expressions, like all others to come which operate on target properties, must initalize the dag checker. --- Source/cmIncludeDirectoryCommand.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Source/cmIncludeDirectoryCommand.cxx') diff --git a/Source/cmIncludeDirectoryCommand.cxx b/Source/cmIncludeDirectoryCommand.cxx index 11c5f4e9c2..ba81849898 100644 --- a/Source/cmIncludeDirectoryCommand.cxx +++ b/Source/cmIncludeDirectoryCommand.cxx @@ -55,6 +55,11 @@ bool cmIncludeDirectoryCommand return true; } +static bool StartsWithGeneratorExpression(const std::string &input) +{ + return input[0] == '$' && input[1] == '<'; +} + // do a lot of cleanup on the arguments because this is one place where folks // sometimes take the output of a program and pass it directly into this // command not thinking that a single argument could be filled with spaces @@ -105,7 +110,7 @@ void cmIncludeDirectoryCommand::AddDirectory(const char *i, cmSystemTools::ConvertToUnixSlashes(ret); if(!cmSystemTools::FileIsFullPath(ret.c_str())) { - if(ret[0] != '$' && ret[1] != '<') + if(!StartsWithGeneratorExpression(ret)) { std::string tmp = this->Makefile->GetStartDirectory(); tmp += "/"; -- cgit v1.2.1