Author: cito
Date: Fri Jan 8 08:18:36 2016
New Revision: 700
Log:
Use appropriate compiler options with Visual Studio
The MSVC compiler does not recognize some of the GNU compiler options.
So when MSVC is detected, we replace them with equivalent options.
Modified:
branches/4.x/module/setup.py
trunk/module/setup.py
Modified: branches/4.x/module/setup.py
==============================================================================
--- branches/4.x/module/setup.py Thu Jan 7 17:25:05 2016 (r699)
+++ branches/4.x/module/setup.py Fri Jan 8 08:18:36 2016 (r700)
@@ -88,7 +88,7 @@
library_dirs = [get_python_lib(), pg_config('libdir')]
define_macros = [('PYGRESQL_VERSION', version)]
undef_macros = []
-extra_compile_args = ['-O2', '-Wall', '-Werror', '-funsigned-char']
+extra_compile_args = ['-O2', '-funsigned-char', '-Wall', '-Werror']
class build_pg_ext(build_ext):
@@ -160,6 +160,7 @@
define_macros.append(('MS_WIN64', None))
elif compiler == 'msvc': # Microsoft Visual C++
libraries[0] = 'lib' + libraries[0]
+ extra_compile_args[1:] = ['-J', '-W3', '-WX']
setup(
Modified: trunk/module/setup.py
==============================================================================
--- trunk/module/setup.py Thu Jan 7 17:25:05 2016 (r699)
+++ trunk/module/setup.py Fri Jan 8 08:18:36 2016 (r700)
@@ -89,7 +89,7 @@
library_dirs = [get_python_lib(), pg_config('libdir')]
define_macros = [('PYGRESQL_VERSION', version)]
undef_macros = []
-extra_compile_args = ['-O2', '-Wall', '-Werror', '-funsigned-char']
+extra_compile_args = ['-O2', '-funsigned-char', '-Wall', '-Werror']
class build_pg_ext(build_ext):
@@ -161,6 +161,7 @@
define_macros.append(('MS_WIN64', None))
elif compiler == 'msvc': # Microsoft Visual C++
libraries[0] = 'lib' + libraries[0]
+ extra_compile_args[1:] = ['-J', '-W3', '-WX']
setup(
_______________________________________________
PyGreSQL mailing list
[email protected]
https://mail.vex.net/mailman/listinfo.cgi/pygresql