From 5359825552a56322ee3a85c0fbd316440f3322be Mon Sep 17 00:00:00 2001 From: Petr Wolf Date: Fri, 16 Mar 2012 13:59:28 +0100 Subject: [PATCH] Add NOMINMAX macro to fix a compilation error on Win32 --- bootstrap.py | 2 +- configure.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap.py b/bootstrap.py index ca47b19..9d00ca8 100755 --- a/bootstrap.py +++ b/bootstrap.py @@ -65,7 +65,7 @@ if sys.platform.startswith('win32'): 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', diff --git a/configure.py b/configure.py index 9c9d108..52f2193 100755 --- a/configure.py +++ b/configure.py @@ -104,7 +104,7 @@ else: 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: -- 2.7.4