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