From 9c2e77385fe5bc787b42e275570ddf26c023d0bb Mon Sep 17 00:00:00 2001 From: Matthias Krack Date: Sun, 7 Jun 2026 14:41:19 +0200 Subject: [PATCH] Add NOT APPLE condition to linker option guard (#5369) --- cmake/CompilerConfiguration.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/CompilerConfiguration.cmake b/cmake/CompilerConfiguration.cmake index 1bc66d6003..1d901033a5 100644 --- a/cmake/CompilerConfiguration.cmake +++ b/cmake/CompilerConfiguration.cmake @@ -226,6 +226,8 @@ if(CMAKE_C_COMPILER_ID STREQUAL "Cray" AND CMAKE_C_COMPILER_VERSION endif() # Suppress GFortran runtime warnings when LIBXS provides the wrapper -if(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" AND CP2K_USE_LIBXS) +if(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" + AND CP2K_USE_LIBXS + AND NOT APPLE) add_link_options("-Wl,--wrap=_gfortran_runtime_warning_at") endif()