From c74b3d9d6cc40361a2a95850a06852277bb24582 Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Mon, 17 Mar 2025 18:47:29 -0600 Subject: [PATCH] Check Fortran compiler name instead of C compiler name There is some logic in the CMakeLists.txt file that checks the name of the C compiler to determine if it is the GNU compiler. This logic should be changed to check the name of the Fortran compiler instead. This is important on a Mac where the C compiler is clang and the Fortran compiler is gfortran. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7e26a0f0f..1320f5c3e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -244,7 +244,7 @@ if (PIO_ENABLE_COVERAGE) endif () # Allow argument mismatch in gfortran versions > 10 for mpi library compatibility -if (CMAKE_C_COMPILER_NAME STREQUAL "GNU") +if (CMAKE_Fortran_COMPILER_NAME STREQUAL "GNU") if ("${CMAKE_Fortran_COMPILER_VERSION}" VERSION_LESS 10) message (WARNING "gfortran version is ${CMAKE_Fortran_COMPILER_VERSION}") else()