Fix configuration Fortran environment

SCons was using gfortran to build and ifort to link
when ifort was specified in cantera.conf. This ensures
the check function has the correct Fortran in the
environment to compile the test.
This commit is contained in:
Bryan W. Weber 2016-08-15 21:40:24 -04:00
parent 8ada40f0be
commit 5435af2d9e
No known key found for this signature in database
GPG key ID: DEE60DAAA4195429

View file

@ -930,8 +930,8 @@ program main
end program main
'''
if which(compiler) is not None:
env['FORTRAN'] = compiler
success, output = conf.TryRun(hello_world, '.f90')
env['F77'] = env['F90'] = env['F95'] = env['F03'] = env['FORTRAN'] = compiler
success, output = conf.TryRun(hello_world, '.f90')
if success and 'Hello, world!' in output:
return True
else:
@ -944,6 +944,8 @@ end program main
return False
env['F77FLAGS'] = env['F90FLAGS'] = env['F95FLAGS'] = env['F03FLAGS'] = env['FORTRANFLAGS']
if env['f90_interface'] in ('y','default'):
foundF90 = False
if env['FORTRAN']:
@ -974,7 +976,6 @@ elif 'ifort' in env['FORTRAN']:
env['FORTRANMODDIRPREFIX'] = '-module '
env['F77'] = env['F90'] = env['F95'] = env['F03'] = env['FORTRAN']
env['F77FLAGS'] = env['F90FLAGS'] = env['F95FLAGS'] = env['F03FLAGS'] = env['FORTRANFLAGS']
env['FORTRANMODDIR'] = '${TARGET.dir}'