mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-08 23:00:07 -06:00
cmOutputConverter: Let GetFortranFormat accept a cm::string_view
This commit is contained in:
@@ -150,13 +150,11 @@ std::string cmOutputConverter::EscapeWindowsShellArgument(const char* arg,
|
||||
}
|
||||
|
||||
cmOutputConverter::FortranFormat cmOutputConverter::GetFortranFormat(
|
||||
const char* value)
|
||||
cm::string_view value)
|
||||
{
|
||||
FortranFormat format = FortranFormatNone;
|
||||
if (value && *value) {
|
||||
std::vector<std::string> fmt;
|
||||
cmSystemTools::ExpandListArgument(value, fmt);
|
||||
for (std::string const& fi : fmt) {
|
||||
if (!value.empty()) {
|
||||
for (std::string const& fi : cmSystemTools::ExpandedListArgument(value)) {
|
||||
if (fi == "FIXED") {
|
||||
format = FortranFormatFixed;
|
||||
}
|
||||
@@ -168,6 +166,15 @@ cmOutputConverter::FortranFormat cmOutputConverter::GetFortranFormat(
|
||||
return format;
|
||||
}
|
||||
|
||||
cmOutputConverter::FortranFormat cmOutputConverter::GetFortranFormat(
|
||||
const char* value)
|
||||
{
|
||||
if (!value) {
|
||||
return FortranFormatNone;
|
||||
}
|
||||
return GetFortranFormat(cm::string_view(value));
|
||||
}
|
||||
|
||||
void cmOutputConverter::SetLinkScriptShell(bool linkScriptShell)
|
||||
{
|
||||
this->LinkScriptShell = linkScriptShell;
|
||||
|
||||
@@ -89,6 +89,7 @@ public:
|
||||
FortranFormatFixed,
|
||||
FortranFormatFree
|
||||
};
|
||||
static FortranFormat GetFortranFormat(cm::string_view value);
|
||||
static FortranFormat GetFortranFormat(const char* value);
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user