summaryrefslogtreecommitdiffstats
path: root/Source/cmDepends.cxx
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2012-02-22 21:38:17 (GMT)
committerDavid Cole <david.cole@kitware.com>2012-02-22 21:40:30 (GMT)
commitd90eed445fe6cfe4d5998813d4cb24151f8d8f9d (patch)
treeda476b58892b3cbd812d2e720e1a41e73f05f82e /Source/cmDepends.cxx
parent8233636dbe531ccf36510242e7c997dfa6529bde (diff)
downloadCMake-d90eed445fe6cfe4d5998813d4cb24151f8d8f9d.zip
CMake-d90eed445fe6cfe4d5998813d4cb24151f8d8f9d.tar.gz
CMake-d90eed445fe6cfe4d5998813d4cb24151f8d8f9d.tar.bz2
Fix compiler error reported on older Borland dashboard.
Declare variable only once at a scope appropriate for both uses.
Diffstat (limited to 'Source/cmDepends.cxx')
-rw-r--r--Source/cmDepends.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmDepends.cxx b/Source/cmDepends.cxx
index 94ff471..b511f65 100644
--- a/Source/cmDepends.cxx
+++ b/Source/cmDepends.cxx
@@ -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);
}