Skip to content

Commit

Permalink
Update [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
pfernique committed Feb 6, 2018
1 parent c8fb7eb commit f5f399b
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/py/autowig/_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,18 +145,9 @@ def pre_processing(asg, headers, flags, **kwargs):
else:
raise Exception("unknown system")

if '-x c++' in cmd:
asg._language = 'c++'
s = subprocess.Popen(['clang', '-x', 'c++', '-v', '-E', devnull],
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
elif '-x c' in cmd:
asg._language = 'c'
s = subprocess.Popen(['clang', '-x', 'c', '-v', '-E', devnull],
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
else:
raise ValueError('\'flags\' parameter must include the `-x` option with `c` or `c++`')

if not bootstrapping:
s = subprocess.Popen([compiler, '-x', asg._language, '-v', '-E', devnull],
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
if s.returncode:
warnings.warn('System includes not computed: clang command failed', Warning)
else:
Expand Down

0 comments on commit f5f399b

Please sign in to comment.