summaryrefslogtreecommitdiffstats
path: root/configure.py
diff options
context:
space:
mode:
authorHiroyuki Iwatsuki <don@na.rim.or.jp>2012-01-25 06:52:46 (GMT)
committerHiroyuki Iwatsuki <don@na.rim.or.jp>2012-01-25 06:52:46 (GMT)
commitd3bcb4a00eb9b59946a90541447a606de74c0bbb (patch)
tree51ea237525e7cebe7f0cc812bfdbb97ab64c9e50 /configure.py
parent982de2ff79a1d862026763bcff17582ebeef5a5d (diff)
downloadNinja-d3bcb4a00eb9b59946a90541447a606de74c0bbb.zip
Ninja-d3bcb4a00eb9b59946a90541447a606de74c0bbb.tar.gz
Ninja-d3bcb4a00eb9b59946a90541447a606de74c0bbb.tar.bz2
Fix configure.py for unpacked gtest on Windows platform.
-Use /EHsc instead of -fvisibility=hidden -Use valid objext -Use cflags + gtest_cflags
Diffstat (limited to 'configure.py')
-rwxr-xr-xconfigure.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/configure.py b/configure.py
index be47446..0133043 100755
--- a/configure.py
+++ b/configure.py
@@ -256,13 +256,16 @@ if options.with_gtest:
path = options.with_gtest
gtest_all_incs = '-I%s -I%s' % (path, os.path.join(path, 'include'))
- gtest_cflags = '-fvisibility=hidden ' + gtest_all_incs
- objs += n.build(built('gtest-all.o'), 'cxx',
+ if platform == 'windows':
+ gtest_cflags = '/EHsc ' + gtest_all_incs
+ else:
+ gtest_cflags = '-fvisibility=hidden ' + gtest_all_incs
+ objs += n.build(built('gtest-all' + objext), 'cxx',
os.path.join(path, 'src/gtest-all.cc'),
- variables=[('cflags', gtest_cflags)])
- objs += n.build(built('gtest_main.o'), 'cxx',
+ variables=[('cflags', cflags + [gtest_cflags])])
+ objs += n.build(built('gtest_main' + objext), 'cxx',
os.path.join(path, 'src/gtest_main.cc'),
- variables=[('cflags', gtest_cflags)])
+ variables=[('cflags', cflags + [gtest_cflags])])
test_cflags = cflags + ['-I%s' % os.path.join(path, 'include')]
elif platform == 'windows':