Skip to content

Commit

Permalink
move searching for fortran outside of the "does framework not exist i…
Browse files Browse the repository at this point in the history
…f()f"
  • Loading branch information
JorisGoosen committed Nov 30, 2023
1 parent 6a9e066 commit f6a7d20
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions Tools/CMake/R.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -347,23 +347,6 @@ if(APPLE)
message(CHECK_FAIL "failed.")
endif()

message(CHECK_START "Locating the 'gfortran'")

find_program(
FORTRAN_EXECUTABLE
NAMES gfortran
PATHS ${GFORTRAN_PATH}
NO_DEFAULT_PATH
DOC "'gfortran' is needed for building some of the R packages")

if(NOT FORTRAN_EXECUTABLE)
message(CHECK_FAIL "not found")
message(FATAL_ERROR "Please install 'gfortran' before continuing.")
else()
message(CHECK_PASS "found")
message(STATUS " ${FORTRAN_EXECUTABLE}")
endif()

# --------------------------------------------------------
# Patching R.framework and everything related to it ------
#
Expand Down Expand Up @@ -469,6 +452,23 @@ if(APPLE)

endif()

message(CHECK_START "Locating the 'gfortran'")

find_program(
FORTRAN_EXECUTABLE
NAMES gfortran
PATHS ${GFORTRAN_PATH}
NO_DEFAULT_PATH
DOC "'gfortran' is needed for building some of the R packages")

if(NOT FORTRAN_EXECUTABLE)
message(CHECK_FAIL "not found")
message(FATAL_ERROR "Please install 'gfortran' before continuing.")
else()
message(CHECK_PASS "found")
message(STATUS "FORTRAN_EXECUTABLE=${FORTRAN_EXECUTABLE}")
endif()

endif()

#
Expand Down

0 comments on commit f6a7d20

Please sign in to comment.