Skip to content
Snippets Groups Projects
Commit fa64dcaf authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

[pybind] Revive compiler diagnostics support

parent 359d17f5
No related branches found
No related tags found
1 merge request!44Pybind11
...@@ -221,9 +221,27 @@ if _cl.have_gl(): ...@@ -221,9 +221,27 @@ if _cl.have_gl():
pass pass
# {{{ diagnostics
class _ErrorRecord(Record): class _ErrorRecord(Record):
pass pass
class CompilerWarning(UserWarning):
pass
def compiler_output(text):
import os
from warnings import warn
if int(os.environ.get("PYOPENCL_COMPILER_OUTPUT", "0")):
warn(text, CompilerWarning)
else:
warn("Non-empty compiler output encountered. Set the "
"environment variable PYOPENCL_COMPILER_OUTPUT=1 "
"to see more.", CompilerWarning)
# }}}
# {{{ find pyopencl shipped source code # {{{ find pyopencl shipped source code
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment