summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorGregor Jasny <gjasny@googlemail.com>2015-02-25 20:07:43 (GMT)
committerBrad King <brad.king@kitware.com>2015-03-23 13:12:18 (GMT)
commit3714955b9cded21b13064886b30a412211ce217e (patch)
treeba361c972d5fa02c267a54cc5df514294cd0141f /Source/cmTarget.cxx
parent54a5cdbb4c35aa8847d3eb0f7f418fad72563992 (diff)
downloadCMake-3714955b9cded21b13064886b30a412211ce217e.zip
CMake-3714955b9cded21b13064886b30a412211ce217e.tar.gz
CMake-3714955b9cded21b13064886b30a412211ce217e.tar.bz2
OS X: Add handling for XCTest bundles
An XCTest bundle is a CFBundle with a special product-type and bundle extension. For more information about XCTest visit the Mac Developer library at: http://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/testing_with_xcode/ Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx16
1 files changed, 15 insertions, 1 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index b70f60d..b3d1155 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -616,6 +616,13 @@ bool cmTarget::IsCFBundleOnApple() const
}
//----------------------------------------------------------------------------
+bool cmTarget::IsXCTestOnApple() const
+{
+ return (this->IsCFBundleOnApple() &&
+ this->GetPropertyAsBool("XCTEST"));
+}
+
+//----------------------------------------------------------------------------
bool cmTarget::IsBundleOnApple() const
{
return this->IsFrameworkOnApple() || this->IsAppBundleOnApple() ||
@@ -6791,7 +6798,14 @@ std::string cmTarget::GetCFBundleDirectory(const std::string& config,
const char *ext = this->GetProperty("BUNDLE_EXTENSION");
if (!ext)
{
- ext = "bundle";
+ if (this->IsXCTestOnApple())
+ {
+ ext = "xctest";
+ }
+ else
+ {
+ ext = "bundle";
+ }
}
fpath += ext;
fpath += "/Contents";