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:
parent
8ada40f0be
commit
5435af2d9e
1 changed files with 4 additions and 3 deletions
|
|
@ -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}'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue