diff options
author | 2017-02-27 20:52:07 -0800 | |
---|---|---|
committer | 2017-02-27 20:52:07 -0800 | |
commit | 34ed3cce8193bdc1b77372b137ef3bfc28177d3e (patch) | |
tree | 929bb7bf469411189c1144ba4ab2c3954349b4d3 /Python/setup.py | |
parent | 914073d9cca1aaad0e0d922f381ea93815bb8c51 (diff) | |
download | WarpX-34ed3cce8193bdc1b77372b137ef3bfc28177d3e.tar.gz WarpX-34ed3cce8193bdc1b77372b137ef3bfc28177d3e.tar.zst WarpX-34ed3cce8193bdc1b77372b137ef3bfc28177d3e.zip |
Make sure the setup scripts gets the proper options for C++11 on OS X.
Diffstat (limited to 'Python/setup.py')
-rw-r--r-- | Python/setup.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Python/setup.py b/Python/setup.py index 58f77b8da..a9d32134d 100644 --- a/Python/setup.py +++ b/Python/setup.py @@ -6,7 +6,7 @@ setup.py file for WarpX import os from distutils.core import setup, Extension - +import platform import numpy try: @@ -24,6 +24,12 @@ boxlib_includes = [os.path.join(boxlib_home, ii) for ii in boxlib_includes] include_dirs = [numpy_include, '../Source'] + boxlib_includes +cpp11_flags = ['-std=c++11'] +if platform.system() == "Darwin": + macosx_deployment_target = platform.mac_ver()[0] + os.environ['MACOSX_DEPLOYMENT_TARGET'] = macosx_deployment_target + cpp11_flags.append("-stdlib=libc++") + example_module = Extension('pywarpx._warpxC', swig_opts=['-c++', '-outdir', 'pywarpx'], sources=['warpxC.i'], @@ -31,7 +37,7 @@ example_module = Extension('pywarpx._warpxC', libraries=['warpx'], include_dirs = include_dirs, define_macros = [('BL_USE_MPI','1'), ('BL_SPACEDIM','3'), ('BL_FORT_USE_UNDERSCORE','1'), ('USE_PARTICLES', None)], - extra_compile_args = ['-std=c++11'], + extra_compile_args = cpp11_flags, ) setup (name = 'pywarpx', |