Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import copy
import os
import sys
from glob import glob
import tempfile
import subprocess
Expand All @@ -17,6 +19,9 @@
extra_compile_args = []
extra_link_args = []

if not sys.platform.startswith("win"):
extra_compile_args += ["-Wno-incompatible-pointer-types"]

#
# Figure out if we need to add any extra flags:
#
Expand Down Expand Up @@ -110,9 +115,11 @@ def try_compile(cpp_code, compiler, cflags=[], lflags=[]):
def check_flags(compiler):
"""Check if we need to adjust the standard cflags for specific systems"""
# Start with a canonical set of flags to use
cflags = extra_compile_args
cppflags = extra_compile_args
lflags = extra_link_args
# the way this file gets run by pip, you need copies here even though
# these variables are not marked as global.
cflags = copy.copy(extra_compile_args)
cppflags = copy.copy(extra_compile_args)
lflags = copy.copy(extra_link_args)

# Check whether we can safely add -std=c++11
if try_compile("int main (int argc, char **argv) { return 0; }",
Expand Down