Merge topic 'vs-fortran' into release-4.3

a380179285 Tests: Fix FortranOnly test with Intel Fortran VS integration
e75e912601 Tests: Fix FortranCInterface test with MSVC+IntelLLVM
1146a66d60 VS: Fix regression in Fortran project generation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11860
This commit is contained in:
Brad King authored and Kitware Robot committed 2026-03-25 11:47:59 -04:00
commit a2b39b756a
3 files changed
+12 -9

No files matched your search

+7 -6
View File
@@ -3,7 +3,6 @@
#include "cmLocalVisualStudio7Generator.h"
#include <algorithm>
#include <cassert>
#include <cstring>
#include <functional>
#include <sstream>
@@ -1681,17 +1680,19 @@ bool cmLocalVisualStudio7Generator::WriteGroup(
// Loop through each source in the source group.
for (cmSourceFile const* sf : sourceFiles) {
// We only need source group members that are part of this target.
auto si = sources.Index.find(sf);
if (si == sources.Index.end()) {
continue;
}
std::string source = sf->GetFullPath();
if (source != libName || target->GetType() == cmStateEnums::UTILITY ||
target->GetType() == cmStateEnums::GLOBAL_TARGET ||
target->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
// Look up the source kind and configs.
auto map_it = sources.Index.find(sf);
// The map entry must exist because we populated it earlier.
assert(map_it != sources.Index.end());
cmGeneratorTarget::AllConfigSource const& acs =
sources.Sources[map_it->second];
sources.Sources[si->second];
FCInfo fcinfo(this, target, acs, configs);
+1 -1
View File
@@ -3,7 +3,7 @@ project(FortranC C Fortran)
# Skip this test for compilers not known to be compatible.
if(NOT (CMAKE_C_COMPILER_ID STREQUAL CMAKE_Fortran_COMPILER_ID OR
"${CMAKE_C_COMPILER_ID}-${CMAKE_Fortran_COMPILER_ID}" MATCHES "^(MSVC-Intel|(GNU|Clang)-(LLVMFlang|LFortran))$"))
"${CMAKE_C_COMPILER_ID}-${CMAKE_Fortran_COMPILER_ID}" MATCHES "^(MSVC-(Intel|IntelLLVM)|(GNU|Clang)-(LLVMFlang|LFortran))$"))
message(STATUS "${CMAKE_C_COMPILER_ID} C and ${CMAKE_Fortran_COMPILER_ID} Fortran not known to be compatible!")
return()
endif()
+4 -2
View File
@@ -200,7 +200,9 @@ if(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_OFF AND
endif()
# Test that we are safe from infinite include recursion in dependency scanner
# (SunPro Fortran compiler does not support recursive inclusion)
if (NOT CMAKE_Fortran_COMPILER_ID STREQUAL "SunPro")
if (# The SunPro Fortran compiler does not support recursive inclusion
NOT CMAKE_Fortran_COMPILER_ID STREQUAL "SunPro"
# The Intel Fortran VS integration overflows its stack.
AND NOT CMAKE_GENERATOR MATCHES "Visual Studio")
add_executable(test_include_loop test_include_loop.F)
endif()