Use IsImported from cmGeneratorTarget.

This commit is contained in:
Stephen Kelly
2015-10-16 20:05:47 +02:00
parent beff29f0d4
commit ed09f3b292
6 changed files with 17 additions and 17 deletions

View File

@@ -45,7 +45,7 @@ std::string cmCustomCommandGenerator::GetCommand(unsigned int c) const
cmGeneratorTarget* target =
this->LG->FindGeneratorTargetToUse(argv0);
if(target && target->GetType() == cmState::EXECUTABLE &&
(target->Target->IsImported()
(target->IsImported()
|| !this->LG->GetMakefile()->IsOn("CMAKE_CROSSCOMPILING")))
{
return target->GetLocation(this->Config);