diff --git a/aesara/configdefaults.py b/aesara/configdefaults.py index 6ec9c45778..15d48291d9 100644 --- a/aesara/configdefaults.py +++ b/aesara/configdefaults.py @@ -548,6 +548,16 @@ def add_compile_configvars(): in_c_key=False, ) + # Resolves C++11 narrowing error on Mac OS + # https://github.com/aesara-devs/aesara/issues/127 + no_cpp_narrowing_flag = "-Wno-c++11-narrowing" + cxx_flags = config.gcc__cxxflags.split() + if sys.platform == "darwin": + if no_cpp_narrowing_flag not in cxx_flags: + cxx_flags.append(no_cpp_narrowing_flag) + + config.gcc__cxxflags = " ".join(cxx_flags) + config.add( "cmodule__warn_no_version", "If True, will print a warning when compiling one or more Op "