summaryrefslogtreecommitdiff
path: root/Source/cmDepends.cxx
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2012-02-22 17:12:11 -0500
committerDavid Cole <david.cole@kitware.com>2012-02-22 17:12:11 -0500
commitf66e735de393c25408d9e955aa8f27c9611ac245 (patch)
tree78b8e0799c210653455c5e1cdde2c518c2283b56 /Source/cmDepends.cxx
parentd90eed445fe6cfe4d5998813d4cb24151f8d8f9d (diff)
downloadcmake-f66e735de393c25408d9e955aa8f27c9611ac245.tar.gz
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 b511f65b52..9296d4cca6 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);
}