From 0140d293def838fc9e6b67bc6ac48c9ebd40c8de Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 19 Oct 2009 15:21:01 -0400 Subject: Avoid C++ linker language in VS Fortran project In Visual Studio project files we pass compiler flags to the whole target based on the linker language, which works for MS tools and combinations of C and C++. For the Intel Fortran plugin though the generated .vfproj files should never contain C or C++ options. We generate .vfproj files only for targets consisting only of Fortran code. Now that the linker language is computed transitively through linking it is possible that the linker language is C++ for an otherwise Fortran-only project. This commit forces Fortran as the linker language for the purpose of specifying target-wide flags in .vfproj files. See issue #9719. --- Source/cmLocalVisualStudio7Generator.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 8639adb..fe91ff9 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -588,7 +588,8 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout, std::string flags; if(strcmp(configType, "10") != 0) { - const char* linkLanguage = target.GetLinkerLanguage(configName); + const char* linkLanguage = (this->FortranProject? "Fortran": + target.GetLinkerLanguage(configName)); if(!linkLanguage) { cmSystemTools::Error -- cgit v0.12