Skip to content

Commit

Permalink
Fixed compilation issues on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
aldro61 committed May 31, 2019
1 parent 7410fe5 commit 3438161
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions cppext/setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
from distutils.core import setup, Extension
import numpy as np

from distutils.core import setup, Extension
from platform import system as get_os_name


# Configure the compiler based on the OS
if get_os_name().lower() == "darwin":
os_compile_flags = ["-mmacosx-version-min=10.9"]
else:
os_compile_flags = []

cppext_module = Extension(
'cppext',
sources=['src/cppextmodule.cpp'],
Expand All @@ -12,7 +21,7 @@
extra_compile_args=['-O3',
# '-march=corei7-avx', # uncomment if available
'-std=c++11',
'-Wno-parentheses'],
'-Wno-parentheses'] + os_compile_flags,
# uncomment if available
# extra_link_args=['-framework',
# 'accelerate',
Expand Down

0 comments on commit 3438161

Please sign in to comment.