summaryrefslogtreecommitdiffstats
path: root/Source/cmDepends.cxx
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2012-02-22 22:12:11 (GMT)
committerDavid Cole <david.cole@kitware.com>2012-02-22 22:12:11 (GMT)
commitf66e735de393c25408d9e955aa8f27c9611ac245 (patch)
tree78b8e0799c210653455c5e1cdde2c518c2283b56 /Source/cmDepends.cxx
parentd90eed445fe6cfe4d5998813d4cb24151f8d8f9d (diff)
downloadCMake-f66e735de393c25408d9e955aa8f27c9611ac245.zip
CMake-f66e735de393c25408d9e955aa8f27c9611ac245.tar.gz
CMake-f66e735de393c25408d9e955aa8f27c9611ac245.tar.bz2
Fix compiler warning reported on older Borland dashboard.
Avoid assignment inside the if.
Diffstat (limited to 'Source/cmDepends.cxx')
-rw-r--r--Source/cmDepends.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmDepends.cxx b/Source/cmDepends.cxx
index b511f65..9296d4c 100644
--- a/Source/cmDepends.cxx
+++ b/Source/cmDepends.cxx
@@ -266,7 +266,8 @@ void cmDepends::SetIncludePathFromLanguage(const char* lang)
includePathVar += lang;
includePathVar += "_TARGET_INCLUDE_PATH";
cmMakefile* mf = this->LocalGenerator->GetMakefile();
- if(includePath = mf->GetDefinition(includePathVar.c_str()))
+ includePath = mf->GetDefinition(includePathVar.c_str());
+ if(includePath)
{
cmSystemTools::ExpandListArgument(includePath, this->IncludePath);
}
@@ -276,7 +277,8 @@ void cmDepends::SetIncludePathFromLanguage(const char* lang)
includePathVar = "CMAKE_";
includePathVar += lang;
includePathVar += "_INCLUDE_PATH";
- if(includePath = mf->GetDefinition(includePathVar.c_str()))
+ includePath = mf->GetDefinition(includePathVar.c_str());
+ if(includePath)
{
cmSystemTools::ExpandListArgument(includePath, this->IncludePath);
}