Skip to content

Commit

Permalink
Added find_program for CMAKE_Fortran_COMPILER on windows, if path is …
Browse files Browse the repository at this point in the history
…not set for it
  • Loading branch information
makepath-alex committed Dec 19, 2024
1 parent 0905886 commit bfc6c0c
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,16 @@ else()
NO_DEFAULT_PATH
)

# find_program(CMAKE_Fortran_COMPILER gfortran
# PATHS
# $ENV{PREFIX}/Library/bin
# $ENV{BUILD_PREFIX}/Library/bin
# $ENV{CONDA_PREFIX}/Library/bin
# NO_DEFAULT_PATH
# )
# Try go find fortran compiler only, if nothing is set or only name is set
if ((CMAKE_Fortran_COMPILER STREQUAL "") OR (NOT CMAKE_Fortran_COMPILER IN_LIST PREFERRED_FC_COMPILERS))
find_program(CMAKE_Fortran_COMPILER gfortran
PATHS
$ENV{PREFIX}/Library/bin
$ENV{BUILD_PREFIX}/Library/bin
$ENV{CONDA_PREFIX}/Library/bin
NO_DEFAULT_PATH
)
endif()

message(STATUS "CMAKE_AR: ${CMAKE_AR}")
message(STATUS "CMAKE_RANLIB: ${CMAKE_RANLIB}")
Expand Down

0 comments on commit bfc6c0c

Please sign in to comment.