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.
This commit is contained in:
parent
91eeb6d941
commit
0140d293de
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user