Use IsImported from cmGeneratorTarget.
This commit is contained in:
parent
beff29f0d4
commit
ed09f3b292
|
@ -417,7 +417,7 @@ void cmComputeTargetDepends::AddTargetDepend(int depender_index,
|
||||||
const cmGeneratorTarget* dependee,
|
const cmGeneratorTarget* dependee,
|
||||||
bool linking)
|
bool linking)
|
||||||
{
|
{
|
||||||
if(dependee->Target->IsImported() ||
|
if(dependee->IsImported() ||
|
||||||
dependee->GetType() == cmState::INTERFACE_LIBRARY)
|
dependee->GetType() == cmState::INTERFACE_LIBRARY)
|
||||||
{
|
{
|
||||||
// Skip IMPORTED and INTERFACE targets but follow their utility
|
// Skip IMPORTED and INTERFACE targets but follow their utility
|
||||||
|
|
|
@ -45,7 +45,7 @@ std::string cmCustomCommandGenerator::GetCommand(unsigned int c) const
|
||||||
cmGeneratorTarget* target =
|
cmGeneratorTarget* target =
|
||||||
this->LG->FindGeneratorTargetToUse(argv0);
|
this->LG->FindGeneratorTargetToUse(argv0);
|
||||||
if(target && target->GetType() == cmState::EXECUTABLE &&
|
if(target && target->GetType() == cmState::EXECUTABLE &&
|
||||||
(target->Target->IsImported()
|
(target->IsImported()
|
||||||
|| !this->LG->GetMakefile()->IsOn("CMAKE_CROSSCOMPILING")))
|
|| !this->LG->GetMakefile()->IsOn("CMAKE_CROSSCOMPILING")))
|
||||||
{
|
{
|
||||||
return target->GetLocation(this->Config);
|
return target->GetLocation(this->Config);
|
||||||
|
|
|
@ -796,7 +796,7 @@ void cmGeneratorTarget
|
||||||
const char* cmGeneratorTarget::GetLocation(const std::string& config) const
|
const char* cmGeneratorTarget::GetLocation(const std::string& config) const
|
||||||
{
|
{
|
||||||
static std::string location;
|
static std::string location;
|
||||||
if (this->Target->IsImported())
|
if (this->IsImported())
|
||||||
{
|
{
|
||||||
location = this->Target->ImportedGetFullPath(config, false);
|
location = this->Target->ImportedGetFullPath(config, false);
|
||||||
}
|
}
|
||||||
|
@ -1491,7 +1491,7 @@ bool cmGeneratorTarget::MacOSXRpathInstallNameDirDefault() const
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
std::string cmGeneratorTarget::GetSOName(const std::string& config) const
|
std::string cmGeneratorTarget::GetSOName(const std::string& config) const
|
||||||
{
|
{
|
||||||
if(this->Target->IsImported())
|
if(this->IsImported())
|
||||||
{
|
{
|
||||||
// Lookup the imported soname.
|
// Lookup the imported soname.
|
||||||
if(cmGeneratorTarget::ImportInfo const* info =
|
if(cmGeneratorTarget::ImportInfo const* info =
|
||||||
|
@ -1606,7 +1606,7 @@ cmGeneratorTarget::GetFrameworkDirectory(const std::string& config,
|
||||||
std::string
|
std::string
|
||||||
cmGeneratorTarget::GetFullName(const std::string& config, bool implib) const
|
cmGeneratorTarget::GetFullName(const std::string& config, bool implib) const
|
||||||
{
|
{
|
||||||
if(this->Target->IsImported())
|
if(this->IsImported())
|
||||||
{
|
{
|
||||||
return this->GetFullNameImported(config, implib);
|
return this->GetFullNameImported(config, implib);
|
||||||
}
|
}
|
||||||
|
@ -3033,7 +3033,7 @@ void cmGeneratorTarget::GetCompileDefinitions(std::vector<std::string> &list,
|
||||||
void cmGeneratorTarget::ComputeTargetManifest(
|
void cmGeneratorTarget::ComputeTargetManifest(
|
||||||
const std::string& config) const
|
const std::string& config) const
|
||||||
{
|
{
|
||||||
if (this->Target->IsImported())
|
if (this->IsImported())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -3107,7 +3107,7 @@ void cmGeneratorTarget::ComputeTargetManifest(
|
||||||
std::string cmGeneratorTarget::GetFullPath(const std::string& config,
|
std::string cmGeneratorTarget::GetFullPath(const std::string& config,
|
||||||
bool implib, bool realname) const
|
bool implib, bool realname) const
|
||||||
{
|
{
|
||||||
if(this->Target->IsImported())
|
if(this->IsImported())
|
||||||
{
|
{
|
||||||
return this->Target->ImportedGetFullPath(config, implib);
|
return this->Target->ImportedGetFullPath(config, implib);
|
||||||
}
|
}
|
||||||
|
@ -3152,7 +3152,7 @@ cmGeneratorTarget::NormalGetRealName(const std::string& config) const
|
||||||
// This should not be called for imported targets.
|
// This should not be called for imported targets.
|
||||||
// TODO: Split cmTarget into a class hierarchy to get compile-time
|
// TODO: Split cmTarget into a class hierarchy to get compile-time
|
||||||
// enforcement of the limited imported target API.
|
// enforcement of the limited imported target API.
|
||||||
if(this->Target->IsImported())
|
if(this->IsImported())
|
||||||
{
|
{
|
||||||
std::string msg = "NormalGetRealName called on imported target: ";
|
std::string msg = "NormalGetRealName called on imported target: ";
|
||||||
msg += this->GetName();
|
msg += this->GetName();
|
||||||
|
@ -3194,7 +3194,7 @@ void cmGeneratorTarget::GetLibraryNames(std::string& name,
|
||||||
// This should not be called for imported targets.
|
// This should not be called for imported targets.
|
||||||
// TODO: Split cmTarget into a class hierarchy to get compile-time
|
// TODO: Split cmTarget into a class hierarchy to get compile-time
|
||||||
// enforcement of the limited imported target API.
|
// enforcement of the limited imported target API.
|
||||||
if(this->Target->IsImported())
|
if(this->IsImported())
|
||||||
{
|
{
|
||||||
std::string msg = "GetLibraryNames called on imported target: ";
|
std::string msg = "GetLibraryNames called on imported target: ";
|
||||||
msg += this->GetName();
|
msg += this->GetName();
|
||||||
|
@ -3283,7 +3283,7 @@ void cmGeneratorTarget::GetExecutableNames(std::string& name,
|
||||||
// This should not be called for imported targets.
|
// This should not be called for imported targets.
|
||||||
// TODO: Split cmTarget into a class hierarchy to get compile-time
|
// TODO: Split cmTarget into a class hierarchy to get compile-time
|
||||||
// enforcement of the limited imported target API.
|
// enforcement of the limited imported target API.
|
||||||
if(this->Target->IsImported())
|
if(this->IsImported())
|
||||||
{
|
{
|
||||||
std::string msg =
|
std::string msg =
|
||||||
"GetExecutableNames called on imported target: ";
|
"GetExecutableNames called on imported target: ";
|
||||||
|
@ -4735,7 +4735,7 @@ cmGeneratorTarget::GetLinkInterfaceLibraries(const std::string& config,
|
||||||
std::string cmGeneratorTarget::GetDirectory(const std::string& config,
|
std::string cmGeneratorTarget::GetDirectory(const std::string& config,
|
||||||
bool implib) const
|
bool implib) const
|
||||||
{
|
{
|
||||||
if (this->Target->IsImported())
|
if (this->IsImported())
|
||||||
{
|
{
|
||||||
// Return the directory from which the target is imported.
|
// Return the directory from which the target is imported.
|
||||||
return
|
return
|
||||||
|
@ -5413,7 +5413,7 @@ const cmLinkImplementation *
|
||||||
cmGeneratorTarget::GetLinkImplementation(const std::string& config) const
|
cmGeneratorTarget::GetLinkImplementation(const std::string& config) const
|
||||||
{
|
{
|
||||||
// There is no link implementation for imported targets.
|
// There is no link implementation for imported targets.
|
||||||
if(this->Target->IsImported())
|
if(this->IsImported())
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -473,7 +473,7 @@ cmGlobalUnixMakefileGenerator3
|
||||||
(type == cmState::OBJECT_LIBRARY) ||
|
(type == cmState::OBJECT_LIBRARY) ||
|
||||||
(type == cmState::UTILITY))
|
(type == cmState::UTILITY))
|
||||||
{
|
{
|
||||||
if(gtarget->Target->IsImported())
|
if(gtarget->IsImported())
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -632,7 +632,7 @@ cmGlobalUnixMakefileGenerator3
|
||||||
t != targets.end(); ++t)
|
t != targets.end(); ++t)
|
||||||
{
|
{
|
||||||
cmGeneratorTarget* gtarget = t->second;
|
cmGeneratorTarget* gtarget = t->second;
|
||||||
if(gtarget->Target->IsImported())
|
if(gtarget->IsImported())
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -733,7 +733,7 @@ cmGlobalUnixMakefileGenerator3
|
||||||
t != targets.end(); ++t)
|
t != targets.end(); ++t)
|
||||||
{
|
{
|
||||||
cmGeneratorTarget* gtarget = t->second;
|
cmGeneratorTarget* gtarget = t->second;
|
||||||
if(gtarget->Target->IsImported())
|
if(gtarget->IsImported())
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -476,7 +476,7 @@ void cmLocalGenerator::ComputeTargetManifest()
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (target.Target->IsImported())
|
if (target.IsImported())
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ void cmLocalGhsMultiGenerator::Generate()
|
||||||
++l)
|
++l)
|
||||||
{
|
{
|
||||||
if (l->second->GetType() == cmState::INTERFACE_LIBRARY
|
if (l->second->GetType() == cmState::INTERFACE_LIBRARY
|
||||||
|| l->second->Target->IsImported())
|
|| l->second->IsImported())
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue