cmGeneratorTarget: Move HaveWellDefinedOutputFiles from cmTarget.

This commit is contained in:
Stephen Kelly 2015-10-20 00:42:01 +02:00
parent 311018e5ad
commit 3ebc62850c
5 changed files with 15 additions and 15 deletions

View File

@ -1708,6 +1708,16 @@ cmListFileBacktrace cmGeneratorTarget::GetBacktrace() const
return this->Target->GetBacktrace();
}
//----------------------------------------------------------------------------
bool cmGeneratorTarget::HaveWellDefinedOutputFiles() const
{
return
this->GetType() == cmState::STATIC_LIBRARY ||
this->GetType() == cmState::SHARED_LIBRARY ||
this->GetType() == cmState::MODULE_LIBRARY ||
this->GetType() == cmState::EXECUTABLE;
}
//----------------------------------------------------------------------------
const char* cmGeneratorTarget::GetExportMacro() const
{
@ -4819,7 +4829,7 @@ cmGeneratorTarget::OutputInfo const* cmGeneratorTarget::GetOutputInfo(
}
// Only libraries and executables have well-defined output files.
if(!this->Target->HaveWellDefinedOutputFiles())
if(!this->HaveWellDefinedOutputFiles())
{
std::string msg = "cmGeneratorTarget::GetOutputInfo called for ";
msg += this->GetName();

View File

@ -196,6 +196,9 @@ public:
std::string GetModuleDefinitionFile(const std::string& config) const;
/** @return whether this target have a well defined output file name. */
bool HaveWellDefinedOutputFiles() const;
/** Link information from the transitive closure of the link
implementation and the interfaces of its dependencies. */
struct LinkClosure

View File

@ -34,7 +34,7 @@ cmOSXBundleGenerator(cmGeneratorTarget* target,
//----------------------------------------------------------------------------
bool cmOSXBundleGenerator::MustSkip()
{
return !this->GT->Target->HaveWellDefinedOutputFiles();
return !this->GT->HaveWellDefinedOutputFiles();
}
//----------------------------------------------------------------------------

View File

@ -1559,16 +1559,6 @@ void cmTarget::MarkAsImported()
this->IsImportedTarget = true;
}
//----------------------------------------------------------------------------
bool cmTarget::HaveWellDefinedOutputFiles() const
{
return
this->GetType() == cmState::STATIC_LIBRARY ||
this->GetType() == cmState::SHARED_LIBRARY ||
this->GetType() == cmState::MODULE_LIBRARY ||
this->GetType() == cmState::EXECUTABLE;
}
//----------------------------------------------------------------------------
bool cmTarget::HandleLocationPropertyPolicy(cmMakefile* context) const
{

View File

@ -241,9 +241,6 @@ public:
/** Get a backtrace from the creation of the target. */
cmListFileBacktrace const& GetBacktrace() const;
/** @return whether this target have a well defined output file name. */
bool HaveWellDefinedOutputFiles() const;
void InsertInclude(std::string const& entry,
cmListFileBacktrace const& bt,
bool before = false);