diff options
author | Brad King <brad.king@kitware.com> | 2022-05-17 12:47:24 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-05-17 12:47:31 (GMT) |
commit | 2ef9865f090eaf201382cbf737db1c8064e9364e (patch) | |
tree | dee571eb29491ec0ba2bd0d8e2dff7519da00cde | |
parent | 334c3cd4353736ec945710e65c41806007d9bbd3 (diff) | |
parent | cb616d43d6f0912f3b4ab61d210cebe42dbfffb3 (diff) | |
download | CMake-2ef9865f090eaf201382cbf737db1c8064e9364e.zip CMake-2ef9865f090eaf201382cbf737db1c8064e9364e.tar.gz CMake-2ef9865f090eaf201382cbf737db1c8064e9364e.tar.bz2 |
Merge topic 'FortranCInterface-gcc12'
cb616d43d6 FortranCInterface: Fix failure with gfortran 12 and Clang
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7266
-rw-r--r-- | Modules/FortranCInterface/CMakeLists.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/FortranCInterface/CMakeLists.txt b/Modules/FortranCInterface/CMakeLists.txt index ce0bc10..fb35ff0 100644 --- a/Modules/FortranCInterface/CMakeLists.txt +++ b/Modules/FortranCInterface/CMakeLists.txt @@ -112,6 +112,9 @@ if(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" AND CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 12) target_compile_options(FortranCInterface PRIVATE "-fno-lto") target_compile_options(myfort PRIVATE "-flto=auto" "-ffat-lto-objects") +endif() +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() |