summaryrefslogtreecommitdiff
path: root/buildscripts/make_vcxproj.py
diff options
context:
space:
mode:
authorDwight <dwight@10gen.com>2013-12-02 12:45:16 -0500
committerDwight <dwight@10gen.com>2013-12-13 12:16:08 -0500
commitc90068fa13ef447dc1a67f6c6603bcb177931b14 (patch)
tree81b8c0c2854119fac14ef01827f509039c220014 /buildscripts/make_vcxproj.py
parent4c5c052a038ba8fd0f0743cb2fa5dd3bf79bfb6c (diff)
downloadmongo-c90068fa13ef447dc1a67f6c6603bcb177931b14.tar.gz
vcxproj file generator, made it NTDDI_VERSION-aware
Diffstat (limited to 'buildscripts/make_vcxproj.py')
-rw-r--r--buildscripts/make_vcxproj.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/buildscripts/make_vcxproj.py b/buildscripts/make_vcxproj.py
index ff92146cf39..bc8687c9bed 100644
--- a/buildscripts/make_vcxproj.py
+++ b/buildscripts/make_vcxproj.py
@@ -32,7 +32,7 @@ footer= """
</Project>
"""
-common_defines_str = "/DBOOST_ALL_NO_LIB /DMONGO_EXPOSE_MACROS /DSUPPORT_UTF8 /D_UNICODE /DUNICODE /D_CONSOLE /D_CRT_SECURE_NO_WARNINGS /D_WIN32_WINNT=0x0502 /DNTDDI_VERSION=0x05020200 /DMONGO_HAVE___DECLSPEC_THREAD"
+common_defines_str = "/DBOOST_ALL_NO_LIB /DMONGO_EXPOSE_MACROS /DSUPPORT_UTF8 /D_UNICODE /DUNICODE /D_CONSOLE /D_CRT_SECURE_NO_WARNINGS /D_WIN32_WINNT=0x0502 /DMONGO_HAVE___DECLSPEC_THREAD"
def get_defines(x):
res = set()
@@ -48,18 +48,21 @@ f = open('buildscripts/vcxproj.header', 'r')
header = f.read().replace("_TARGET_", target)
print header
+print "<!-- common_defines -->"
print "<ItemDefinitionGroup><ClCompile><PreprocessorDefinitions>"
print ';'.join(common_defines) + ";%(PreprocessorDefinitions)"
print "</PreprocessorDefinitions></ClCompile></ItemDefinitionGroup>\n"
print "<ItemGroup>\n"
-# we don't use _SCONS in vcxproj files, but it's in the input to this script, so add it to common_defines:
+# we don't use _SCONS in vcxproj files, but it's in the input to this script, so add it to common_defines
+# so that it is ignored below and not declared:
common_defines.add("_SCONS")
# likewise we handle DEBUG and such in the vcxproj header:
common_defines.add("DEBUG")
common_defines.add("_DEBUG")
common_defines.add("V8_TARGET_ARCH_X64")
common_defines.add("V8_TARGET_ARCH_IA32")
+common_defines.add("NTDDI_VERSION")
machine_path = ""
@@ -90,7 +93,7 @@ def say(x,line):
# add /D command line items that are uncommon
defines = ""
for s in get_defines(line):
- if s not in common_defines:
+ if s.split('=')[0] not in common_defines:
defines += s
defines += ';'
if defines: