| 296 | } |
| 297 | |
| 298 | std::string cmGlobalXCodeGenerator::GetAppleSpecificPlatformName() |
| 299 | { |
| 300 | std::string sdkRoot = |
| 301 | this->GetCMakeInstance()->GetState()->GetCacheEntryValue( |
| 302 | "CMAKE_OSX_SYSROOT"); |
| 303 | sdkRoot = cmSystemTools::LowerCase(sdkRoot); |
| 304 | |
| 305 | struct SdkDatabaseEntry |
| 306 | { |
| 307 | cm::string_view Name; |
| 308 | cm::string_view AppleName; |
| 309 | }; |
| 310 | |
| 311 | std::array<SdkDatabaseEntry, 6> const sdkDatabase{ { |
| 312 | { "appletvos"_s, "tvOS"_s }, |
| 313 | { "appletvsimulator"_s, "tvOS Simulator"_s }, |
| 314 | { "iphoneos"_s, "iOS"_s }, |
| 315 | { "iphonesimulator"_s, "iOS Simulator"_s }, |
| 316 | { "watchos"_s, "watchOS"_s }, |
| 317 | { "watchsimulator"_s, "watchOS Simulator"_s }, |
| 318 | } }; |
| 319 | |
| 320 | cm::string_view platformName = "MacOS"_s; |
| 321 | for (SdkDatabaseEntry const& entry : sdkDatabase) { |
| 322 | if (cmHasPrefix(sdkRoot, entry.Name) || |
| 323 | sdkRoot.find(cmStrCat('/', entry.Name)) != std::string::npos) { |
| 324 | platformName = entry.AppleName; |
| 325 | break; |
| 326 | } |
| 327 | } |
| 328 | |
| 329 | return std::string(platformName); |
| 330 | } |
| 331 | |
| 332 | std::string const& cmGlobalXCodeGenerator::GetXcodeBuildCommand() |
| 333 | { |
no test coverage detected