diff options
author | David Cournapeau <cournape@gmail.com> | 2014-07-06 17:57:01 +0900 |
---|---|---|
committer | David Cournapeau <cournape@gmail.com> | 2014-07-06 17:57:01 +0900 |
commit | 2b1179f65717c8c1b4c54517573c43f4b15cc34b (patch) | |
tree | d3097578205254b32572bc209c4c9d2bc6136177 /numpy/distutils/command/autodist.py | |
parent | 4769fe79bb5c2d4649fa2845009a0ceae94524c2 (diff) | |
download | numpy-2b1179f65717c8c1b4c54517573c43f4b15cc34b.tar.gz |
FEAT: add check to ensure compilation without warning for a piece of code.
Diffstat (limited to 'numpy/distutils/command/autodist.py')
-rw-r--r-- | numpy/distutils/command/autodist.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/numpy/distutils/command/autodist.py b/numpy/distutils/command/autodist.py index 5602f3857..1c0dc7db1 100644 --- a/numpy/distutils/command/autodist.py +++ b/numpy/distutils/command/autodist.py @@ -58,3 +58,10 @@ main() if not ret or len(output) > 0: return False return True + +def check_compile_without_warning(cmd, body): + cmd._check_compiler() + ret, output = cmd.try_output_compile(body, None, None) + if not ret or len(output) > 0: + return False + return True |