mirror of
https://github.com/Cantera/cantera.git
synced 2026-08-17 16:35:17 -05:00
[SCons] Fix compilation of f77 sample with clang+gfortran
Compiling demo_ftnlib.cpp as a shared object (with -fPIC) fixes an error about being unable to relocate some pthread-related symbol.
This commit is contained in:
committed by
Bryan W. Weber
parent
c9811e8e0a
commit
0edaf316ac
@@ -9,8 +9,8 @@ localenv['mak_stdlib'] = ['-l' + lib for lib in env['cxx_stdlib']]
|
||||
samples = [('ctlib', ['ctlib.f']),
|
||||
('isentropic', ['isentropic.f'])]
|
||||
|
||||
ftn_demo = localenv.Object('demo_ftnlib.cpp',
|
||||
CPPPATH=['#include', localenv['boost_inc_dir'],
|
||||
ftn_demo = localenv.SharedObject('demo_ftnlib.cpp',
|
||||
CPPPATH=['#include', localenv['boost_inc_dir'],
|
||||
localenv['extra_inc_dirs']])
|
||||
for program_name, fortran_sources in samples:
|
||||
buildSample(localenv.Program, program_name,
|
||||
|
||||
@@ -12,7 +12,7 @@ env.Append(FFLAGS='-g',
|
||||
LINKFLAGS=@tmpl_cantera_linkflags@,
|
||||
FRAMEWORKS=@tmpl_cantera_frameworks@)
|
||||
|
||||
ctlib = env.Object('demo_ftnlib.cpp')
|
||||
ctlib = env.SharedObject('demo_ftnlib.cpp')
|
||||
|
||||
demo = env.Program('demo', [ctlib, 'demo.f'],
|
||||
LINK='@FORTRAN_LINK@')
|
||||
|
||||
Reference in New Issue
Block a user