Skip to content

Commit 195f250

Browse files
committed
Fix VERSION_GREATER_EQUAL not present in old cmake
1 parent 50f6f72 commit 195f250

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ endif()
4949
# Set CMAKE_Fortran_COMPILER_VERSION if CMake doesn't do it for us
5050
#-----------------------------------------------------------------
5151
if ( NOT CMAKE_Fortran_COMPILER_VERSION )
52-
if ( CMAKE_VERSION VERSION_GREATER_EQUAL 3.3.1 )
52+
if ( NOT (CMAKE_VERSION VERSION_LESS 3.3.1) )
5353
message( AUTHOR_WARNING
5454
"CMake ${CMAKE_VERSION} should know about Fortran compiler versions but is missing CMAKE_Fortran_COMPILER_VERSION variable."
5555
)
@@ -105,7 +105,7 @@ 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 )
108+
if ( gfortran_compiler AND ( NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 7.0.0 ) )
109109
add_definitions(-DGCC_GE_7) # Tell library to build against GFortran 7.x bindings b/c we might be using clang for C
110110
endif()
111111

@@ -430,7 +430,7 @@ if(opencoarrays_aware_compiler)
430430
add_mpi_test(asynchronous_hello_world 3 ${tests_root}/integration/events/asynchronous_hello_world)
431431

432432
# Regression tests based on reported issues
433-
if(gfortran_compiler AND (CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 7.0.0))
433+
if(gfortran_compiler AND (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 7.0.0))
434434
# GFortran PR 78505 only fixed on trunk/gcc 7
435435
add_mpi_test(source-alloc-no-sync 8 ${tests_root}/regression/reported/source-alloc-sync)
436436
endif()

0 commit comments

Comments
 (0)