Skip to content

Commit 20833ec

Browse files
committed
The proposed change corresponds to a bug that will be fixed in 3.3.1. Until then, a temporary fix is required.
1 parent 57283dc commit 20833ec

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

CMakeLists.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ cmake_minimum_required(VERSION 3.0)
33
#Name project and specify source languages
44
project(opencoarrays VERSION 2.0.0 LANGUAGES C Fortran)
55

6+
# Temporary fix
7+
if (CMAKE_VERSION VERSION_EQUAL 3.3.0)
8+
set(CMAKE_Fortran_COMPILER_VERSION ${CMAKE_Fortran_COMPILER_VERSION}
9+
CACHE STRING "")
10+
mark_as_advanced(FORCE CMAKE_Fortran_COMPILER_VERSION)
11+
endif()
12+
613
#Print an error message on an attempt to build inside the source directory tree:
714
if ("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
815
message(FATAL_ERROR "ERROR! "
@@ -42,9 +49,6 @@ endif()
4249

4350
if (CMAKE_VERSION VERSION_GREATER 3.2.3)
4451
# Detect Fortran compiler version directly
45-
set(CMAKE_Fortran_COMPILER_VERSION ${CMAKE_Fortran_COMPILER_VERSION}
46-
CACHE STRING "")
47-
mark_as_advanced(FORCE CMAKE_Fortran_COMPILER_VERSION)
4852
if(gfortran_compiler AND (CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER 5.0.0))
4953
set(opencoarrays_aware_compiler true)
5054
add_definitions(-DPREFIX_NAME=_gfortran_caf_)

0 commit comments

Comments
 (0)