summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-10-09 22:15:38 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-10-19 18:27:41 (GMT)
commit7550879f570502f31aeafbd48f04bafd17234696 (patch)
tree4dfcc2a21c477df2c429fa10b3d85f5422887f0e
parent88d10d55ac68f2251a549cf09292af8a1fb66ba3 (diff)
downloadCMake-7550879f570502f31aeafbd48f04bafd17234696.zip
CMake-7550879f570502f31aeafbd48f04bafd17234696.tar.gz
CMake-7550879f570502f31aeafbd48f04bafd17234696.tar.bz2
cmGeneratorTarget: Move IsXCTestOnApple from cmTarget.
-rw-r--r--Source/cmGeneratorTarget.cxx9
-rw-r--r--Source/cmGeneratorTarget.h3
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx4
-rw-r--r--Source/cmTarget.cxx7
-rw-r--r--Source/cmTarget.h3
5 files changed, 13 insertions, 13 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index ab0d02b..7e457bb 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -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"));
+}
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index 24a1c2c..ce2f42e 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -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;
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 527a84f..a489767 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -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";
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 761267d..02a5ea6 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -377,13 +377,6 @@ bool cmTarget::IsCFBundleOnApple() const
}
//----------------------------------------------------------------------------
-bool cmTarget::IsXCTestOnApple() const
-{
- return (this->IsCFBundleOnApple() &&
- this->GetPropertyAsBool("XCTEST"));
-}
-
-//----------------------------------------------------------------------------
void cmTarget::AddTracedSources(std::vector<std::string> const& srcs)
{
if (!srcs.empty())
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 51e97fd..7cf4808 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -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;