diff options
author | Brad King <brad.king@kitware.com> | 2009-10-19 19:21:01 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-10-19 19:21:01 (GMT) |
commit | 0140d293def838fc9e6b67bc6ac48c9ebd40c8de (patch) | |
tree | ded2732c0a66ad3be296f595e6a8184cdb4391c3 /Source | |
parent | 91eeb6d941ecb8cffcb8427356c786a2f696d332 (diff) | |
download | CMake-0140d293def838fc9e6b67bc6ac48c9ebd40c8de.zip CMake-0140d293def838fc9e6b67bc6ac48c9ebd40c8de.tar.gz CMake-0140d293def838fc9e6b67bc6ac48c9ebd40c8de.tar.bz2 |
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.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
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 |