mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-07 04:02:23 +03:00
Merge topic 'vs-fortran' into release-4.3
a380179285Tests: Fix FortranOnly test with Intel Fortran VS integratione75e912601Tests: Fix FortranCInterface test with MSVC+IntelLLVM1146a66d60VS: Fix regression in Fortran project generation Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !11860
This commit is contained in:
commit
a2b39b756a
3 files changed
+12
-9
No files matched your search
@@ -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);
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
Reference in new issue
Block a user