The site may go offline a few minutes between 12pm EDT and 12:30pm EDT (UTC-0400) while updates are applied.

Commit 7e0d9f15 authored by Brad King's avatar Brad King

CMakeAddFortranSubdirectory: Find gfortran in PATH

In the find_program(MINGW_GFORTRAN) call use the PATHS option for
hard-coded guesses instead of HINTS.  This allows the user environment
to override the guesses and corrects usage of the command options.
parent d6b03128
......@@ -44,10 +44,13 @@ include(ExternalProject)
include(CMakeParseArguments)
function(_setup_mingw_config_and_build source_dir)
find_program(MINGW_GFORTRAN NAMES gfortran
HINTS
c:/MinGW/bin
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MinGW;InstallLocation]/bin" )
# Look for a MinGW gfortran.
find_program(MINGW_GFORTRAN
NAMES gfortran
PATHS
c:/MinGW/bin
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MinGW;InstallLocation]/bin"
)
if(NOT MINGW_GFORTRAN)
message(FATAL_ERROR
"gfortran not found, please install MinGW with the gfortran option."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment