Skip to content

Commit 51989e0

Browse files
committed
Fix C++11 narrowing error on Mac OS
Resolves #127
1 parent c028e38 commit 51989e0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

aesara/configdefaults.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,16 @@ def add_compile_configvars():
548548
in_c_key=False,
549549
)
550550

551+
# Resolves C++11 narrowing error on Mac OS
552+
# https://github.com/aesara-devs/aesara/issues/127
553+
no_cpp_narrowing_flag = "-Wno-c++11-narrowing"
554+
cxx_flags = config.gcc__cxx_flags.split()
555+
if sys.platform == "darwin":
556+
if no_cpp_narrowing_flag not in cxx_flags:
557+
cxx_flags.append(no_cpp_narrowing_flag)
558+
559+
config.gcc.cxx_flags = cxx_flags.join(" ")
560+
551561
config.add(
552562
"cmodule__warn_no_version",
553563
"If True, will print a warning when compiling one or more Op "

0 commit comments

Comments
 (0)