Fix compiler error reported on older Borland dashboard.
Declare variable only once at a scope appropriate for both uses.
This commit is contained in:
parent
8233636dbe
commit
d90eed445f
|
@ -261,11 +261,12 @@ bool cmDepends::CheckDependencies(std::istream& internalDepends,
|
|||
void cmDepends::SetIncludePathFromLanguage(const char* lang)
|
||||
{
|
||||
// Look for the new per "TARGET_" variant first:
|
||||
const char * includePath = 0;
|
||||
std::string includePathVar = "CMAKE_";
|
||||
includePathVar += lang;
|
||||
includePathVar += "_TARGET_INCLUDE_PATH";
|
||||
cmMakefile* mf = this->LocalGenerator->GetMakefile();
|
||||
if(const char* includePath = mf->GetDefinition(includePathVar.c_str()))
|
||||
if(includePath = mf->GetDefinition(includePathVar.c_str()))
|
||||
{
|
||||
cmSystemTools::ExpandListArgument(includePath, this->IncludePath);
|
||||
}
|
||||
|
@ -275,7 +276,7 @@ void cmDepends::SetIncludePathFromLanguage(const char* lang)
|
|||
includePathVar = "CMAKE_";
|
||||
includePathVar += lang;
|
||||
includePathVar += "_INCLUDE_PATH";
|
||||
if(const char* includePath = mf->GetDefinition(includePathVar.c_str()))
|
||||
if(includePath = mf->GetDefinition(includePathVar.c_str()))
|
||||
{
|
||||
cmSystemTools::ExpandListArgument(includePath, this->IncludePath);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue