diff options
author | Gregor Jasny <gjasny@googlemail.com> | 2015-02-25 20:07:43 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-03-23 13:12:18 (GMT) |
commit | 3714955b9cded21b13064886b30a412211ce217e (patch) | |
tree | ba361c972d5fa02c267a54cc5df514294cd0141f /Source/cmGlobalXCodeGenerator.cxx | |
parent | 54a5cdbb4c35aa8847d3eb0f7f418fad72563992 (diff) | |
download | CMake-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/cmGlobalXCodeGenerator.cxx')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index bd8a1f5..d340e72 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -804,6 +804,10 @@ GetSourcecodeValueFromFileExtension(const std::string& _ext, { sourcecode = "compiled.mach-o.objfile"; } + else if(ext == "xctest") + { + sourcecode = "wrapper.cfbundle"; + } else if(ext == "xib") { keepLastKnownFileType = true; @@ -2598,7 +2602,9 @@ const char* cmGlobalXCodeGenerator::GetTargetFileType(cmTarget& cmtarget) case cmTarget::STATIC_LIBRARY: return "archive.ar"; case cmTarget::MODULE_LIBRARY: - if (cmtarget.IsCFBundleOnApple()) + if (cmtarget.IsXCTestOnApple()) + return "wrapper.cfbundle"; + else if (cmtarget.IsCFBundleOnApple()) return "wrapper.plug-in"; else return ((this->XcodeVersion >= 22)? @@ -2622,7 +2628,9 @@ const char* cmGlobalXCodeGenerator::GetTargetProductType(cmTarget& cmtarget) case cmTarget::STATIC_LIBRARY: return "com.apple.product-type.library.static"; case cmTarget::MODULE_LIBRARY: - if (cmtarget.IsCFBundleOnApple()) + if (cmtarget.IsXCTestOnApple()) + return "com.apple.product-type.bundle.unit-test"; + else if (cmtarget.IsCFBundleOnApple()) return "com.apple.product-type.bundle"; else return ((this->XcodeVersion >= 22)? |