Drop if(...) check because condition is always true

GetLocation returns std::string::c_str() which is never NULL
This commit is contained in:
Yury G. Kudryashov 2012-02-25 13:20:57 +04:00 committed by Brad King
parent 6a1c5a3569
commit 4f6fd961da
1 changed files with 2 additions and 9 deletions

View File

@ -1902,15 +1902,8 @@ bool cmLocalGenerator::GetRealDependency(const char* inName,
case cmTarget::SHARED_LIBRARY: case cmTarget::SHARED_LIBRARY:
case cmTarget::MODULE_LIBRARY: case cmTarget::MODULE_LIBRARY:
case cmTarget::UNKNOWN_LIBRARY: case cmTarget::UNKNOWN_LIBRARY:
{ dep = target->GetLocation(config);
// Get the location of the target's output file and depend on it.
if(const char* location = target->GetLocation(config))
{
dep = location;
return true; return true;
}
}
break;
case cmTarget::UTILITY: case cmTarget::UTILITY:
case cmTarget::GLOBAL_TARGET: case cmTarget::GLOBAL_TARGET:
// A utility target has no file on which to depend. This was listed // A utility target has no file on which to depend. This was listed