diff options
author | Brad King <brad.king@kitware.com> | 2023-08-01 13:30:41 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-08-01 13:30:55 (GMT) |
commit | 08c637423c48f588c46d426bdafc1fd7b9e7bb86 (patch) | |
tree | 83f1f4ea85fe8edd17496f6afa089e9e1348006a /Source/cmXcFramework.cxx | |
parent | d56b0f9339c841c05fedee9ffb872638429caaa9 (diff) | |
parent | 09b7ac7f6781fcf665cadf08a19a274bfc8c3521 (diff) | |
download | CMake-08c637423c48f588c46d426bdafc1fd7b9e7bb86.zip CMake-08c637423c48f588c46d426bdafc1fd7b9e7bb86.tar.gz CMake-08c637423c48f588c46d426bdafc1fd7b9e7bb86.tar.bz2 |
Merge topic 'clang-tidy-xcode-generator'
09b7ac7f67 strings: use single characters where possible
6aa9023700 string_view: use string_view literals in comparisons
1b60137b98 strings: combine string literals
e1b70d7286 cmCPackDragNDropGenerator: use a string instead of a stream for commands
f5d04b5bf0 cmStrCat: use where possible in Apple-specific sources
3af822cd8f cmXCode21Object: simplify streaming expression
c4f751604b cmLocalXCodeGenerator: return a default string
ce549909fb cmCPackPKGGenerator: remove unnecessary `.c_str()` calls
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8660
Diffstat (limited to 'Source/cmXcFramework.cxx')
-rw-r--r-- | Source/cmXcFramework.cxx | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Source/cmXcFramework.cxx b/Source/cmXcFramework.cxx index 6435ef9..3c447e3 100644 --- a/Source/cmXcFramework.cxx +++ b/Source/cmXcFramework.cxx @@ -4,6 +4,7 @@ #include <string> +#include <cm/string_view> #include <cmext/string_view> #include <cm3p/json/value.h> @@ -43,23 +44,23 @@ bool PlistSupportedPlatformHelper( return false; } - if (value->asString() == "macos") { + if (value->asString() == "macos"_s) { platform = cmXcFrameworkPlistSupportedPlatform::macOS; return true; } - if (value->asString() == "ios") { + if (value->asString() == "ios"_s) { platform = cmXcFrameworkPlistSupportedPlatform::iOS; return true; } - if (value->asString() == "tvos") { + if (value->asString() == "tvos"_s) { platform = cmXcFrameworkPlistSupportedPlatform::tvOS; return true; } - if (value->asString() == "watchos") { + if (value->asString() == "watchos"_s) { platform = cmXcFrameworkPlistSupportedPlatform::watchOS; return true; } - if (value->asString() == "xros") { + if (value->asString() == "xros"_s) { platform = cmXcFrameworkPlistSupportedPlatform::visionOS; return true; } @@ -112,8 +113,8 @@ cm::optional<cmXcFrameworkPlist> cmParseXcFrameworkPlist( cmStrCat("Invalid xcframework .plist file:\n ", plistPath), bt); return cm::nullopt; } - if (metadata.CFBundlePackageType != "XFWK" || - metadata.XCFrameworkFormatVersion != "1.0") { + if (metadata.CFBundlePackageType != "XFWK"_s || + metadata.XCFrameworkFormatVersion != "1.0"_s) { mf.GetCMakeInstance()->IssueMessage( MessageType::FATAL_ERROR, cmStrCat("Expected:\n ", plistPath, |