Skip to content

Commit

Permalink
Add NOMINMAX macro to fix a compilation error on Win32
Browse files Browse the repository at this point in the history
  • Loading branch information
Petr Wolf committed Mar 16, 2012
1 parent fdec96f commit 5359825
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def run(*args, **kwargs):

vcdir = os.environ.get('VCINSTALLDIR')
if vcdir:
args = [os.path.join(vcdir, 'bin', 'cl.exe'), '/nologo', '/EHsc']
args = [os.path.join(vcdir, 'bin', 'cl.exe'), '/nologo', '/EHsc', '/DNOMINMAX']
else:
args = shlex.split(os.environ.get('CXX', 'g++'))
args.extend(['-Wno-deprecated',
Expand Down
2 changes: 1 addition & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def binary(name):
if platform == 'windows':
cflags = ['/nologo', '/Zi', '/W4', '/WX', '/wd4530', '/wd4100', '/wd4706',
'/wd4512', '/wd4800', '/wd4702', '/wd4819',
'/D_CRT_SECURE_NO_WARNINGS',
'/DNOMINMAX', '/D_CRT_SECURE_NO_WARNINGS',
"/DNINJA_PYTHON=\"%s\"" % (options.with_python,)]
ldflags = ['/DEBUG', '/libpath:$builddir']
if not options.debug:
Expand Down

0 comments on commit 5359825

Please sign in to comment.