Skip to content

Commit 5527264

Browse files
committed
Remove redundant checks for OCA compilers
- Fixes #58 The checks performed in the top level CMakeLists.txt are inherited whenever other CMake files are `include`d or `add_subdirectory`-d - `${opencoarrays_aware_compiler}` set in top level and inherited everywhere else
1 parent c7022fe commit 5527264

File tree

2 files changed

+0
-32
lines changed

2 files changed

+0
-32
lines changed

src/mpi/CMakeLists.txt

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,6 @@ elseif("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "PGI")
1010
set(portland_group_compiler true)
1111
endif()
1212

13-
if (NOT CMAKE_VERSION VERSION_LESS 3.3.1)
14-
# Detect Fortran compiler version directly
15-
if(gfortran_compiler AND (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 5))
16-
set(opencoarrays_aware_compiler true)
17-
else()
18-
set(opencoarrays_aware_compiler false)
19-
endif()
20-
else()
21-
# Use the C compiler version as a proxy for the Fortran compiler version (won't work with NAG)
22-
if(gfortran_compiler AND (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5))
23-
set(opencoarrays_aware_compiler true)
24-
else()
25-
set(opencoarrays_aware_compiler false)
26-
endif()
27-
endif()
28-
2913
if(gfortran_compiler AND (NOT opencoarrays_aware_compiler))
3014
# This applied to gfortran 4.9 and some earlier versions (FIX ME: find out which)
3115
add_definitions(-DCOMPILER_SUPPORTS_CAF_INTRINSICS)

src/tests/unit/extensions/CMakeLists.txt

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,6 @@ if("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "GNU")
22
set(gfortran_compiler true)
33
endif()
44

5-
if (NOT CMAKE_VERSION VERSION_LESS 3.3.1)
6-
# Detect Fortran compiler version directly
7-
if(gfortran_compiler AND (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 5.1))
8-
set(opencoarrays_aware_compiler true)
9-
else()
10-
set(opencoarrays_aware_compiler false)
11-
endif()
12-
else()
13-
# Use the C compiler version as a proxy for the Fortran compiler version (won't work with NAG)
14-
if(gfortran_compiler AND (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.1))
15-
set(opencoarrays_aware_compiler true)
16-
else()
17-
set(opencoarrays_aware_compiler false)
18-
endif()
19-
endif()
20-
215
if("${gfortran_compiler}" AND (NOT "${opencoarrays_aware_compiler}"))
226
# This applied to gfortran 4.9 and some earlier versions (TODO: find out which)
237
add_definitions(-DCOMPILER_SUPPORTS_CAF_INTRINSICS)

0 commit comments

Comments
 (0)