diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index ac93c9063e..95f2a6be98 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -243,7 +243,7 @@ void cmDependsFortran::LocateModules() // Load information about other targets. cmMakefile* mf = this->LocalGenerator->GetMakefile(); std::vector infoFiles; - mf->GetDefExpandList("CMAKE_TARGET_LINKED_INFO_FILES", infoFiles); + mf->GetDefExpandList("CMAKE_Fortran_TARGET_LINKED_INFO_FILES", infoFiles); for (std::string const& i : infoFiles) { std::string targetDir = cmSystemTools::GetFilenamePath(i); std::string fname = targetDir + "/fortran.internal"; diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 58cdb224c4..4f80edcb5c 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1495,7 +1495,7 @@ void cmMakefileTargetGenerator::WriteTargetDependRules() *this->InfoFileStream << "\n" "# Targets to which this target links which contain Fortran sources.\n" - "set(CMAKE_TARGET_LINKED_INFO_FILES\n"; + "set(CMAKE_Fortran_TARGET_LINKED_INFO_FILES\n"; /* clang-format on */ std::vector dirs = this->GetLinkedTargetDirectories(this->GetConfigName());