summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudioGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-03-01 16:47:34 (GMT)
committerBrad King <brad.king@kitware.com>2019-03-01 16:58:21 (GMT)
commit0b82f56ac69f2140cc05e7bdd4564ebf87ea6c6f (patch)
tree0dbedf61f2858d2330871abef0833f4178f3f6b8 /Source/cmGlobalVisualStudioGenerator.cxx
parent20a41aa589d4418f9ac46fc8c0402162d1d82873 (diff)
downloadCMake-0b82f56ac69f2140cc05e7bdd4564ebf87ea6c6f.zip
CMake-0b82f56ac69f2140cc05e7bdd4564ebf87ea6c6f.tar.gz
CMake-0b82f56ac69f2140cc05e7bdd4564ebf87ea6c6f.tar.bz2
VS: Fix Fortran target type selection with RC sources
The Intel Fortran `.vfproj` files do support both Fortran and the Windows Resource compiler (`.rc)` files. Prior to CMake 3.9 we did not support that, but commit 2c9f35789d (VS: Decide project type by linker lang as fallback, 2017-03-30, v3.9.0-rc1~340^2) accidentally enabled it. It was then broken by commit d3d2c3cd49 (VS: Fix Fortran target type selection when linking C++ targets, 2019-02-04, v3.14.0-rc1~13^2). Restore support for Fortran+RC in VS projects and add a test case. Fixes: #19002
Diffstat (limited to 'Source/cmGlobalVisualStudioGenerator.cxx')
-rw-r--r--Source/cmGlobalVisualStudioGenerator.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index 1922906..639dc22 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -834,6 +834,10 @@ bool cmGlobalVisualStudioGenerator::TargetIsFortranOnly(
if (linkLang && *linkLang) {
languages.insert(linkLang);
}
+
+ // Intel Fortran .vfproj files do support the resource compiler.
+ languages.erase("RC");
+
return languages.size() == 1 && *languages.begin() == "Fortran";
}