Browse Source

pyext needs c++11 in linux and mac. (#4930)

Arun Olappamanna Vasudevan 7 years ago
parent
commit
c7e0e262a6
1 changed files with 1 additions and 6 deletions
  1. 1 6
      python/setup.py

+ 1 - 6
python/setup.py

@@ -185,6 +185,7 @@ if __name__ == '__main__':
         extra_compile_args.append('-Wno-write-strings')
         extra_compile_args.append('-Wno-invalid-offsetof')
         extra_compile_args.append('-Wno-sign-compare')
+        extra_compile_args.append('-std=c++11')
 
     # https://github.com/Theano/Theano/issues/4926
     if sys.platform == 'win32':
@@ -201,12 +202,6 @@ if __name__ == '__main__':
     if "clang" in os.popen('$CC --version 2> /dev/null').read():
       extra_compile_args.append('-Wno-shorten-64-to-32')
 
-    v, _, _ = platform.mac_ver()
-    if v:
-      extra_compile_args.append('-std=c++11')
-    elif os.getenv('KOKORO_BUILD_NUMBER') or os.getenv('KOKORO_BUILD_ID'):
-      extra_compile_args.append('-std=c++11')
-
     if warnings_as_errors in sys.argv:
       extra_compile_args.append('-Werror')
       sys.argv.remove(warnings_as_errors)