[SCons] Build the Cython module with debug symbols when requested

This commit is contained in:
Ray Speth 2012-12-26 23:56:01 +00:00
parent 0ff4964184
commit a852400384
2 changed files with 9 additions and 2 deletions

View file

@ -70,10 +70,16 @@ localenv['py_libdirs'] = repr([x for x in libDirs if x])
# Compile the Python module with the same compiler as the rest of Cantera
localenv['py_extra_compiler_args'] = repr([])
localenv['py_extra_link_args'] = repr([])
if localenv['OS'] == 'Windows':
if env['CC'] == 'cl':
flags = ['/EHsc']
if env['debug']:
flags.extend(['/Zi', '/Fd_cantera.pdb'])
localenv['py_extra_link_args'] = repr(['/DEBUG'])
compilerOpt = ' --compiler=msvc'
localenv['py_extra_compiler_args'] = repr(['/EHsc'])
localenv['py_extra_compiler_args'] = repr(flags)
elif env['CC'] == 'gcc':
compilerOpt = ' --compiler=mingw32'
else:

View file

@ -9,7 +9,8 @@ exts = [Extension("cantera._cantera",
language="c++",
libraries=@py_cantera_libs@,
library_dirs=@py_libdirs@,
extra_compile_args=@py_extra_compiler_args@)]
extra_compile_args=@py_extra_compiler_args@,
extra_link_args=@py_extra_link_args@)]
setup(name="Cantera",
version="@cantera_version@",