diff options
author | Evan Martin <martine@danga.com> | 2012-04-05 00:13:19 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2012-04-05 00:13:19 (GMT) |
commit | 90a396113e27bf9c00a527ef7790376c3558a527 (patch) | |
tree | c0dbc44faba01d65f6c3a8f380705156cf6f6ae1 | |
parent | abd33d5e3b11ae5470f62cbce49723a4cf62870d (diff) | |
parent | 5359825552a56322ee3a85c0fbd316440f3322be (diff) | |
download | Ninja-90a396113e27bf9c00a527ef7790376c3558a527.zip Ninja-90a396113e27bf9c00a527ef7790376c3558a527.tar.gz Ninja-90a396113e27bf9c00a527ef7790376c3558a527.tar.bz2 |
Merge pull request #257 from PetrWolf/53598255
Add NOMINMAX macro to fix a compilation error on Win32
-rwxr-xr-x | bootstrap.py | 2 | ||||
-rwxr-xr-x | 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: |