Changeset 700


Ignore:
Timestamp:
Jan 8, 2016, 8:18:36 AM (4 years ago)
Author:
cito
Message:

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.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.x/module/setup.py

    r691 r700  
    8989define_macros = [('PYGRESQL_VERSION', version)]
    9090undef_macros = []
    91 extra_compile_args = ['-O2', '-Wall', '-Werror', '-funsigned-char']
     91extra_compile_args = ['-O2', '-funsigned-char', '-Wall', '-Werror']
    9292
    9393
     
    161161            elif compiler == 'msvc':  # Microsoft Visual C++
    162162                libraries[0] = 'lib' + libraries[0]
     163                extra_compile_args[1:] = ['-J', '-W3', '-WX']
    163164
    164165
  • trunk/module/setup.py

    r691 r700  
    9090define_macros = [('PYGRESQL_VERSION', version)]
    9191undef_macros = []
    92 extra_compile_args = ['-O2', '-Wall', '-Werror', '-funsigned-char']
     92extra_compile_args = ['-O2', '-funsigned-char', '-Wall', '-Werror']
    9393
    9494
     
    162162            elif compiler == 'msvc':  # Microsoft Visual C++
    163163                libraries[0] = 'lib' + libraries[0]
     164                extra_compile_args[1:] = ['-J', '-W3', '-WX']
    164165
    165166
Note: See TracChangeset for help on using the changeset viewer.