mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-04 04:40:56 -06:00
cmOutputConverter::GetFortranFormat(): delete const char* overload
This commit is contained in:
@@ -73,11 +73,12 @@ void cmCommonTargetGenerator::AddModuleDefinitionFlag(
|
||||
void cmCommonTargetGenerator::AppendFortranFormatFlags(
|
||||
std::string& flags, cmSourceFile const& source)
|
||||
{
|
||||
cmProp srcfmt = source.GetProperty("Fortran_FORMAT");
|
||||
const std::string srcfmt = source.GetSafeProperty("Fortran_FORMAT");
|
||||
cmOutputConverter::FortranFormat format =
|
||||
cmOutputConverter::GetFortranFormat(srcfmt ? srcfmt->c_str() : nullptr);
|
||||
cmOutputConverter::GetFortranFormat(srcfmt);
|
||||
if (format == cmOutputConverter::FortranFormatNone) {
|
||||
const char* tgtfmt = this->GeneratorTarget->GetProperty("Fortran_FORMAT");
|
||||
const std::string tgtfmt =
|
||||
this->GeneratorTarget->GetSafeProperty("Fortran_FORMAT");
|
||||
format = cmOutputConverter::GetFortranFormat(tgtfmt);
|
||||
}
|
||||
const char* var = nullptr;
|
||||
|
||||
@@ -808,9 +808,8 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeSourceFile(
|
||||
|
||||
// Add flags from target and source file properties.
|
||||
std::string flags;
|
||||
cmProp srcfmt = sf->GetProperty("Fortran_FORMAT");
|
||||
switch (
|
||||
cmOutputConverter::GetFortranFormat(srcfmt ? srcfmt->c_str() : nullptr)) {
|
||||
const std::string srcfmt = sf->GetSafeProperty("Fortran_FORMAT");
|
||||
switch (cmOutputConverter::GetFortranFormat(srcfmt)) {
|
||||
case cmOutputConverter::FortranFormatFixed:
|
||||
flags = "-fixed " + flags;
|
||||
break;
|
||||
@@ -2290,7 +2289,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
|
||||
|
||||
// Add Fortran source format attribute if property is set.
|
||||
const char* format = nullptr;
|
||||
const char* tgtfmt = gtgt->GetProperty("Fortran_FORMAT");
|
||||
const std::string tgtfmt = gtgt->GetSafeProperty("Fortran_FORMAT");
|
||||
switch (cmOutputConverter::GetFortranFormat(tgtfmt)) {
|
||||
case cmOutputConverter::FortranFormatFixed:
|
||||
format = "fixed";
|
||||
|
||||
@@ -672,7 +672,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(
|
||||
|
||||
if (this->FortranProject) {
|
||||
switch (cmOutputConverter::GetFortranFormat(
|
||||
target->GetProperty("Fortran_FORMAT"))) {
|
||||
target->GetSafeProperty("Fortran_FORMAT"))) {
|
||||
case cmOutputConverter::FortranFormatFixed:
|
||||
flags += " -fixed";
|
||||
break;
|
||||
|
||||
@@ -170,15 +170,6 @@ 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;
|
||||
|
||||
@@ -94,7 +94,6 @@ public:
|
||||
FortranFormatFree
|
||||
};
|
||||
static FortranFormat GetFortranFormat(cm::string_view value);
|
||||
static FortranFormat GetFortranFormat(const char* value);
|
||||
|
||||
private:
|
||||
cmState* GetState() const;
|
||||
|
||||
Reference in New Issue
Block a user