Commit 5291386bd20d5ba2b879c74dc1e6255bd53530e3
1 parent
2d0ec436
Correctly pass --coverage option to Python extension module.
Showing
1 changed file
with
7 additions
and
2 deletions
pyext/setup.py.in
| ... | ... | @@ -108,12 +108,17 @@ data_files=[('@prefix@/share/ctools/swig', install_files)] |
| 108 | 108 | |
| 109 | 109 | # Optionally enable OpenMP |
| 110 | 110 | if '@OPENMP_TRUE@' != '#': |
| 111 | - extra_compile_args = ['@OPENMP_CXXFLAGS@','@COVERAGE_CXXFLAGS@'] | |
| 111 | + extra_compile_args = ['@OPENMP_CXXFLAGS@'] | |
| 112 | 112 | extra_link_args = ['@OPENMP_CXXFLAGS@'] |
| 113 | 113 | else: |
| 114 | - extra_compile_args = ['@COVERAGE_CXXFLAGS@'] | |
| 114 | + extra_compile_args = [] | |
| 115 | 115 | extra_link_args = [] |
| 116 | 116 | |
| 117 | +# Append coverage CXXFLAGS | |
| 118 | +if len('@COVERAGE_CXXFLAGS@') > 0: | |
| 119 | + extra_compile_args.append('@COVERAGE_CXXFLAGS@') | |
| 120 | + extra_link_args.append('@COVERAGE_CXXFLAGS@') | |
| 121 | + | |
| 117 | 122 | # Optionally add link flag for El Capitan post-processing of modules |
| 118 | 123 | if '@IS_ELCAPITAN_TRUE@' != '#': |
| 119 | 124 | extra_link_args.append('-headerpad_max_install_names') | ... | ... |