Skip to content

Commit

Permalink
fix Cython 3.0.0b1 warnings: default to C++11
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Mar 1, 2023
1 parent 9f65741 commit 6f10807
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,9 +611,14 @@ def ace(modnames="xpra.x11.bindings.xxx", pkgconfig_names="", optimize=None, **k
value = (value, )
add_to_keywords(pkgc, addto, *value)
pkgc.update(kwargs)
if WIN32 and kwargs.get("language", "")=="c++":
CPP = kwargs.get("language", "")=="c++"
if CPP:
#default to "-std=c++11" for c++
if not any(v.startswith("-std=") for v in pkgc.get("extra_compile_args", ())):
add_to_keywords(pkgc, "extra_compile_args", "-std=c++11")
#all C++ modules trigger an address warning in the module initialization code:
add_to_keywords(pkgc, "extra_compile_args", "-Wno-error=address")
if WIN32:
add_to_keywords(pkgc, "extra_compile_args", "-Wno-error=address")
add_cython_ext(modname, src, **pkgc)

def tace(toggle, *args, **kwargs):
Expand Down

0 comments on commit 6f10807

Please sign in to comment.