Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ else()
)
endif()

if (CMAKE_VERSION VERSION_GREATER 3.2.3)
if (NOT CMAKE_VERSION VERSION_LESS 3.3.1)
# Detect Fortran compiler version directly
if(gfortran_compiler AND (CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER 5.0.0))
if(gfortran_compiler AND (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 5))
set(opencoarrays_aware_compiler true)
add_definitions(-DPREFIX_NAME=_gfortran_caf_)
else()
Expand All @@ -51,7 +51,7 @@ if (CMAKE_VERSION VERSION_GREATER 3.2.3)
endif()
else()
# Use the C compiler version as a proxy for the Fortran compiler version (won't work with NAG)
if(gfortran_compiler AND (CMAKE_C_COMPILER_VERSION VERSION_GREATER 5.0.0))
if(gfortran_compiler AND (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5))
set(opencoarrays_aware_compiler true)
add_definitions(-DPREFIX_NAME=_gfortran_caf_)
else()
Expand Down
6 changes: 3 additions & 3 deletions src/mpi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ elseif("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "Cray")
set(cray_compiler true)
endif()

if (CMAKE_VERSION VERSION_GREATER 3.2.3)
if (NOT CMAKE_VERSION VERSION_LESS 3.3.1)
# Detect Fortran compiler version directly
if(gfortran_compiler AND (CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER 5.0.0))
if(gfortran_compiler AND (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 5))
set(opencoarrays_aware_compiler true)
else()
set(opencoarrays_aware_compiler false)
endif()
else()
# Use the C compiler version as a proxy for the Fortran compiler version (won't work with NAG)
if(gfortran_compiler AND (CMAKE_C_COMPILER_VERSION VERSION_GREATER 5.0.0))
if(gfortran_compiler AND (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5))
set(opencoarrays_aware_compiler true)
else()
set(opencoarrays_aware_compiler false)
Expand Down
6 changes: 3 additions & 3 deletions src/tests/unit/extensions/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ if("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "GNU")
set(gfortran_compiler true)
endif()

if (CMAKE_VERSION VERSION_GREATER 3.2.3)
if (NOT CMAKE_VERSION VERSION_LESS 3.3.1)
# Detect Fortran compiler version directly
if(gfortran_compiler AND (CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER 4.9.2))
if(gfortran_compiler AND (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 5))
set(opencoarrays_aware_compiler true)
else()
set(opencoarrays_aware_compiler false)
endif()
else()
# Use the C compiler version as a proxy for the Fortran compiler version (won't work with NAG)
if(gfortran_compiler AND (CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.9.2))
if(gfortran_compiler AND (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5))
set(opencoarrays_aware_compiler true)
else()
set(opencoarrays_aware_compiler false)
Expand Down