summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-03-01 17:02:31 (GMT)
committerBrad King <brad.king@kitware.com>2019-03-01 17:02:31 (GMT)
commit77439d97fe66804f4cb69792bec5cbb6f5bb6e93 (patch)
tree0dbedf61f2858d2330871abef0833f4178f3f6b8
parent20a41aa589d4418f9ac46fc8c0402162d1d82873 (diff)
parent0b82f56ac69f2140cc05e7bdd4564ebf87ea6c6f (diff)
downloadCMake-77439d97fe66804f4cb69792bec5cbb6f5bb6e93.zip
CMake-77439d97fe66804f4cb69792bec5cbb6f5bb6e93.tar.gz
CMake-77439d97fe66804f4cb69792bec5cbb6f5bb6e93.tar.bz2
Merge branch 'vs-fortran-rc' into release-3.14
Merge-request: !3050
-rw-r--r--Source/cmGlobalVisualStudioGenerator.cxx4
-rw-r--r--Tests/FortranOnly/CMakeLists.txt8
-rw-r--r--Tests/FortranOnly/testRC.rc0
3 files changed, 11 insertions, 1 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";
}
diff --git a/Tests/FortranOnly/CMakeLists.txt b/Tests/FortranOnly/CMakeLists.txt
index 77f6041..45372dd 100644
--- a/Tests/FortranOnly/CMakeLists.txt
+++ b/Tests/FortranOnly/CMakeLists.txt
@@ -12,6 +12,12 @@ add_executable(FortranOnly1 testf.f)
set_property(TARGET FortranOnly1 PROPERTY OUTPUT_NAME FortranOnly)
target_link_libraries(FortranOnly1 FortranOnlylib)
+# Test that Fortran+RC work together.
+# FIXME: Add .rc in more cases.
+if(CMAKE_GENERATOR MATCHES "Visual Studio")
+ set(test_rc testRC.rc)
+endif()
+
# create a custom command that runs FortranOnly1 and puts
# the output into the file testfhello.txt
add_custom_command(OUTPUT ${FortranOnly_BINARY_DIR}/testfhello.txt
@@ -20,7 +26,7 @@ add_custom_command(OUTPUT ${FortranOnly_BINARY_DIR}/testfhello.txt
# create a second executable FortranOnly2 that has
# testfhello.txt has an source file so that it will
# run the above custom command.
-add_executable(FortranOnly2 testfhello.txt testf.f)
+add_executable(FortranOnly2 testfhello.txt testf.f ${test_rc})
target_link_libraries(FortranOnly2 FortranOnlylib)
# create a custom target to check the content of testfhello.txt
# by running the cmake script checktestf2.cmake
diff --git a/Tests/FortranOnly/testRC.rc b/Tests/FortranOnly/testRC.rc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/FortranOnly/testRC.rc