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:30 (GMT) |
commit | e05a4767002dc9c89f93def9d85638ae58f82dc1 (patch) | |
tree | ddae647152124943c4c4feb6d91b8466fa9a2dfb /Modules | |
parent | 29d23ec2cf8c24d408a8f9f227c5b52152e2f8d0 (diff) | |
parent | cb616d43d6f0912f3b4ab61d210cebe42dbfffb3 (diff) | |
download | CMake-e05a4767002dc9c89f93def9d85638ae58f82dc1.zip CMake-e05a4767002dc9c89f93def9d85638ae58f82dc1.tar.gz CMake-e05a4767002dc9c89f93def9d85638ae58f82dc1.tar.bz2 |
Merge topic 'FortranCInterface-gcc12' into release-3.23
cb616d43d6 FortranCInterface: Fix failure with gfortran 12 and Clang
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7266
Diffstat (limited to 'Modules')
-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() |