Skip to content

Commit efb20ee

Browse files
committed
add std=c++11
1 parent ca9a527 commit efb20ee

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

setup.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def main():
102102
# skbuild inserts PYTHON_* vars. That doesn't satisfy opencv build scripts in case of Py3
103103
"-DPYTHON%d_EXECUTABLE=%s" % (sys.version_info[0], sys.executable),
104104
"-DBUILD_opencv_python%d=ON" % sys.version_info[0],
105-
105+
106106
# When off, adds __init__.py and a few more helper .py's. We use our own helper files with a different structure.
107107
"-DOPENCV_SKIP_PYTHON_LOADER=ON",
108108
# Relative dir to install the built module to in the build tree.
@@ -111,7 +111,7 @@ def main():
111111
# Otherwise, opencv scripts would want to install `.pyd' right into site-packages,
112112
# and skbuild bails out on seeing that
113113
"-DINSTALL_CREATE_DISTRIB=ON",
114-
114+
115115
# See opencv/CMakeLists.txt for options and defaults
116116
"-DBUILD_opencv_apps=OFF",
117117
"-DBUILD_SHARED_LIBS=OFF",
@@ -137,8 +137,8 @@ def main():
137137
if sys.platform == 'darwin':
138138
cmake_args.append("-DWITH_LAPACK=OFF") # Some OSX LAPACK fns are incompatible, see
139139
# https://github.com/skvark/opencv-python/issues/21
140-
cmake_args.append("-DCMAKE_CXX_FLAGS=-stdlib=libc++")
141-
cmake_args.append("-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.7")
140+
cmake_args.append("-DCMAKE_CXX_FLAGS=-stdlib=libc++ -std=c++11")
141+
cmake_args.append("-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.8")
142142

143143
if sys.platform.startswith('linux'):
144144
cmake_args.append("-DWITH_IPP=OFF") # tests fail with IPP compiled with
@@ -147,12 +147,12 @@ def main():
147147
if sys.platform.startswith('linux') and not x64:
148148
cmake_args.append("-DCMAKE_CXX_FLAGS=-U__STRICT_ANSI__")
149149

150-
150+
151151
if 'CMAKE_ARGS' in os.environ:
152152
import shlex
153153
cmake_args.extend(shlex.split(os.environ['CMAKE_ARGS']))
154154
del shlex
155-
155+
156156
# ABI config variables are introduced in PEP 425
157157
if sys.version_info[:2] < (3, 2):
158158
import warnings

0 commit comments

Comments
 (0)