Skip to content

Commit

Permalink
add /std:c++20 flag on win32
Browse files Browse the repository at this point in the history
  • Loading branch information
methane committed May 4, 2024
1 parent 9c19133 commit 4206af8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,12 @@ def __init__(self, *args, **kwargs):

libraries = []
macros = []
extra_compile_args = []

if sys.platform == "win32":
libraries.append("ws2_32")
macros = [("__LITTLE_ENDIAN__", "1")]
extra_compile_args = ["/std:c++20"]

ext_modules = []
if not PYPY and not os.environ.get("MSGPACK_PUREPYTHON"):
Expand All @@ -65,6 +67,7 @@ def __init__(self, *args, **kwargs):
libraries=libraries,
include_dirs=["."],
define_macros=macros,
extra_compile_args=extra_compile_args,
)
)
del libraries, macros
Expand Down

0 comments on commit 4206af8

Please sign in to comment.