mirror of
https://github.com/Kitware/CMake.git
synced 2026-08-09 17:18:18 +00:00
FortranCInterface: Restore mangling detection for NAG Fortran
Since commitcb616d43d6(FortranCInterface: Fix failure with gfortran 12 and Clang, 2022-05-16, v3.23.2~10^2) we add LTO flags for C symbols when using the GNU C compiler. However, they are only needed when detecting mangling of the GNU Fortran compiler, as was originally written in commit6a0ce19ce1(FortranCInterface: Fix compatibility with GCC gfortran 12 LTO, 2022-01-19, v3.22.2~5^2). Fixes: #28008
This commit is contained in:
@@ -127,12 +127,10 @@ if(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" AND
|
||||
target_compile_options(FortranCInterface PRIVATE "-fno-lto")
|
||||
if(NOT APPLE)
|
||||
target_compile_options(myfort PRIVATE "-flto=auto" "-ffat-lto-objects")
|
||||
endif()
|
||||
endif()
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND
|
||||
CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 12)
|
||||
if(NOT APPLE)
|
||||
target_compile_options(symbols PRIVATE "-flto=auto" "-ffat-lto-objects")
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND
|
||||
CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 12)
|
||||
target_compile_options(symbols PRIVATE "-flto=auto" "-ffat-lto-objects")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user