Skip to content

Commit

Permalink
removed '-std=c++17' extra-compile-arg when compiling on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
TommasoRonconi committed Feb 26, 2024
1 parent 7a0f94f commit 21768b1
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ def get_version( rel_path ):

def return_extensions () :
from pybind11.setup_helpers import Pybind11Extension
import sys

extra_compile_args = None
if sys.platform not in { 'win32', 'cygwin', 'msys' } :
extra_compile_args = [ '-std=c++17' ]

#############################################################################
# C++ implementation of the interpolation class
Expand All @@ -39,7 +44,7 @@ def return_extensions () :
include_dirs = sorted( [ os.path.join( 'c++', 'utl', 'include' ),
os.path.join( 'pybind11' ) ] ),
libraries = [ "m" ],
extra_compile_args=[ '-std=c++17' ]
extra_compile_args=extra_compile_args
)

#############################################################################
Expand All @@ -57,7 +62,7 @@ def return_extensions () :
os.path.join( 'c++', 'utl', 'include' ),
os.path.join( 'pybind11' ) ] ),
libraries = [ "m" ],
extra_compile_args=[ '-std=c++17' ]
extra_compile_args=extra_compile_args
)

#############################################################################
Expand All @@ -73,7 +78,7 @@ def return_extensions () :
os.path.join( 'c++', 'utl', 'include' ),
os.path.join( 'pybind11' ) ] ),
libraries = [ "m" ],
extra_compile_args=[ '-std=c++17' ]
extra_compile_args=extra_compile_args
)

#############################################################################
Expand All @@ -89,7 +94,7 @@ def return_extensions () :
os.path.join( 'c++', 'utl', 'include' ),
os.path.join( 'pybind11' ) ] ),
libraries = [ "m" ],
extra_compile_args=[ '-std=c++17' ]
extra_compile_args=extra_compile_args
)

#############################################################################
Expand All @@ -104,7 +109,7 @@ def return_extensions () :
os.path.join( 'c++', 'utl', 'include' ),
os.path.join( 'pybind11' ) ] ),
libraries = [ "m" ],
extra_compile_args=[ '-std=c++17' ]
extra_compile_args=extra_compile_args
)

#############################################################################
Expand All @@ -119,7 +124,7 @@ def return_extensions () :
os.path.join( 'c++', 'utl', 'include' ),
os.path.join( 'pybind11' ) ] ),
libraries = [ "m" ],
extra_compile_args=[ '-std=c++17' ]
extra_compile_args=extra_compile_args
)

#############################################################################
Expand All @@ -133,7 +138,7 @@ def return_extensions () :
include_dirs = sorted( [ os.path.join( 'c++', 'utl', 'include' ),
os.path.join( 'pybind11' ) ] ),
libraries = [ "m" ],
extra_compile_args=[ '-std=c++17' ]
extra_compile_args=extra_compile_args
)

return [
Expand Down

0 comments on commit 21768b1

Please sign in to comment.