MCPcopy Create free account
hub / github.com/Kitware/CMake / GetTargetFileType

Method GetTargetFileType

Source/cmGlobalXCodeGenerator.cxx:3446–3477  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3444}
3445
3446char const* cmGlobalXCodeGenerator::GetTargetFileType(
3447 cmGeneratorTarget* target)
3448{
3449 if (cmValue e = target->GetProperty("XCODE_EXPLICIT_FILE_TYPE")) {
3450 return e->c_str();
3451 }
3452
3453 switch (target->GetType()) {
3454 case cmStateEnums::OBJECT_LIBRARY:
3455 return "archive.ar";
3456 case cmStateEnums::STATIC_LIBRARY:
3457 return (target->GetPropertyAsBool("FRAMEWORK") ? "wrapper.framework"
3458 : "archive.ar");
3459 case cmStateEnums::MODULE_LIBRARY:
3460 if (target->IsXCTestOnApple()) {
3461 return "wrapper.cfbundle";
3462 }
3463 if (target->IsCFBundleOnApple()) {
3464 return "wrapper.plug-in";
3465 }
3466 return "compiled.mach-o.executable";
3467 case cmStateEnums::SHARED_LIBRARY:
3468 return (target->GetPropertyAsBool("FRAMEWORK")
3469 ? "wrapper.framework"
3470 : "compiled.mach-o.dylib");
3471 case cmStateEnums::EXECUTABLE:
3472 return "compiled.mach-o.executable";
3473 default:
3474 break;
3475 }
3476 return nullptr;
3477}
3478
3479cm::string_view cmGlobalXCodeGenerator::GetTargetProductType(
3480 cmGeneratorTarget* target)

Callers 1

CreateXCodeTargetMethod · 0.95

Calls 6

c_strMethod · 0.80
IsXCTestOnAppleMethod · 0.80
IsCFBundleOnAppleMethod · 0.80
GetPropertyMethod · 0.45
GetTypeMethod · 0.45
GetPropertyAsBoolMethod · 0.45

Tested by

no test coverage detected