From 5435af2d9e807ad8cc8ac9098034b185aa8c12cf Mon Sep 17 00:00:00 2001 From: "Bryan W. Weber" Date: Mon, 15 Aug 2016 21:40:24 -0400 Subject: [PATCH] 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. --- SConstruct | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/SConstruct b/SConstruct index 28dc21460..68a50dd1e 100644 --- a/SConstruct +++ b/SConstruct @@ -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}'