-
Notifications
You must be signed in to change notification settings - Fork 86
Closed as not planned
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
Extension(
'model.A',
sources=['model/a.i',
'model/a.cpp',
'model/b.c'],
swig_opts=["-c++"],
extra_compile_args=["-std=c++11"],
),
The code above won't compile on macOS. clang complains that -std=c++ could not be used for C source code (i.e. b.c).
There is a quick fix for my issue on this line:
distutils/distutils/ccompiler.py
Line 571 in 35e1c9d
| src, ext = build[obj] |
cc_args = copy(cc_args)
extra_postargs = copy(extra_postargs)
if ext == '.c':
if '-std=c++11' in cc_args:
cc_args.remove('-std=c++11')
if '-std=c++11' in extra_postargs:
extra_postargs.remove('-std=c++11')
However, this is a not decent solution to the cause of the issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed