cmGeneratorTarget: Move IsXCTestOnApple from cmTarget.
This commit is contained in:
parent
88d10d55ac
commit
7550879f57
|
@ -1587,7 +1587,7 @@ std::string cmGeneratorTarget::GetCFBundleDirectory(const std::string& config,
|
|||
const char *ext = this->GetProperty("BUNDLE_EXTENSION");
|
||||
if (!ext)
|
||||
{
|
||||
if (this->Target->IsXCTestOnApple())
|
||||
if (this->IsXCTestOnApple())
|
||||
{
|
||||
ext = "xctest";
|
||||
}
|
||||
|
@ -5962,3 +5962,10 @@ bool cmGeneratorTarget::IsAppBundleOnApple() const
|
|||
this->Makefile->IsOn("APPLE") &&
|
||||
this->GetPropertyAsBool("MACOSX_BUNDLE"));
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool cmGeneratorTarget::IsXCTestOnApple() const
|
||||
{
|
||||
return (this->Target->IsCFBundleOnApple() &&
|
||||
this->GetPropertyAsBool("XCTEST"));
|
||||
}
|
||||
|
|
|
@ -422,6 +422,9 @@ public:
|
|||
/** Return whether this target is an executable Bundle on Apple. */
|
||||
bool IsAppBundleOnApple() const;
|
||||
|
||||
/** Return whether this target is a XCTest on Apple. */
|
||||
bool IsXCTestOnApple() const;
|
||||
|
||||
struct SourceFileFlags
|
||||
GetTargetSourceFileFlags(const cmSourceFile* sf) const;
|
||||
|
||||
|
|
|
@ -2651,7 +2651,7 @@ const char* cmGlobalXCodeGenerator::GetTargetFileType(
|
|||
case cmState::STATIC_LIBRARY:
|
||||
return "archive.ar";
|
||||
case cmState::MODULE_LIBRARY:
|
||||
if (target->Target->IsXCTestOnApple())
|
||||
if (target->IsXCTestOnApple())
|
||||
return "wrapper.cfbundle";
|
||||
else if (target->Target->IsCFBundleOnApple())
|
||||
return "wrapper.plug-in";
|
||||
|
@ -2678,7 +2678,7 @@ const char* cmGlobalXCodeGenerator::GetTargetProductType(
|
|||
case cmState::STATIC_LIBRARY:
|
||||
return "com.apple.product-type.library.static";
|
||||
case cmState::MODULE_LIBRARY:
|
||||
if (target->Target->IsXCTestOnApple())
|
||||
if (target->IsXCTestOnApple())
|
||||
return "com.apple.product-type.bundle.unit-test";
|
||||
else if (target->Target->IsCFBundleOnApple())
|
||||
return "com.apple.product-type.bundle";
|
||||
|
|
|
@ -376,13 +376,6 @@ bool cmTarget::IsCFBundleOnApple() const
|
|||
this->GetPropertyAsBool("BUNDLE"));
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool cmTarget::IsXCTestOnApple() const
|
||||
{
|
||||
return (this->IsCFBundleOnApple() &&
|
||||
this->GetPropertyAsBool("XCTEST"));
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmTarget::AddTracedSources(std::vector<std::string> const& srcs)
|
||||
{
|
||||
|
|
|
@ -238,9 +238,6 @@ public:
|
|||
/** Return whether this target is a CFBundle (plugin) on Apple. */
|
||||
bool IsCFBundleOnApple() const;
|
||||
|
||||
/** Return whether this target is a XCTest on Apple. */
|
||||
bool IsXCTestOnApple() const;
|
||||
|
||||
/** Return whether this target is an executable Bundle on Apple. */
|
||||
bool IsAppBundleOnApple() const;
|
||||
|
||||
|
|
Loading…
Reference in New Issue