Skip to content

Commit 50f6f72

Browse files
committed
Set GCC 7 defines from CMake
Do this incase library is built with clang i.e., by homebrew
1 parent 29b308b commit 50f6f72

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ endif()
105105
CACHE STRING "Flags used by the compiler during release builds with debug info" FORCE)
106106
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -O0")
107107
endif()
108+
if ( gfortran_compiler AND CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 7.0.0 )
109+
add_definitions(-DGCC_GE_7) # Tell library to build against GFortran 7.x bindings b/c we might be using clang for C
110+
endif()
108111

109112
if(gfortran_compiler)
110113
set(OLD_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})

0 commit comments

Comments
 (0)