summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger
diff options
context:
space:
mode:
authorDaniel Moody <daniel.moody@mongodb.com>2022-01-28 11:53:40 -0600
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-01-29 00:44:31 +0000
commit8c067fed75dd4d986e61d6a675ba7133a4dce3a7 (patch)
treeb259c195ebf1e779930adeeb286833ab5d2354b9 /src/third_party/wiredtiger
parent7d739f33ae41f84a63e96be68326ea52b9547815 (diff)
downloadmongo-8c067fed75dd4d986e61d6a675ba7133a4dce3a7.tar.gz
SERVER-62903 switch to using cmake config for generating version information
Diffstat (limited to 'src/third_party/wiredtiger')
-rw-r--r--src/third_party/wiredtiger/SConscript13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/third_party/wiredtiger/SConscript b/src/third_party/wiredtiger/SConscript
index 084b8281bc3..b08a63e4144 100644
--- a/src/third_party/wiredtiger/SConscript
+++ b/src/third_party/wiredtiger/SConscript
@@ -82,17 +82,18 @@ useZlib = True
useSnappy = True
useZstd = True
-version_file = 'build_posix/aclocal/version-set.m4'
+version_file = 'cmake/configs/version.cmake'
VERSION_MAJOR = None
VERSION_MINOR = None
VERSION_PATCH = None
VERSION_STRING = None
-# Read the version information from the version-set.m4 file
+# Read the version information from the version.cmake file
for l in open(File(version_file).srcnode().abspath):
- if re.match(r'^VERSION_[A-Z]+', l):
- exec(l)
+ m = re.match(r'^set\(WT_(VERSION_[A-Z]+) (.+)\)', l)
+ if m and len(m.groups()) == 2:
+ exec('%s=%s' % (m.group(1), m.group(2)))
if (VERSION_MAJOR == None or
VERSION_MINOR == None or
@@ -116,7 +117,7 @@ replacements = {
'@VERSION_MAJOR@' : VERSION_MAJOR,
'@VERSION_MINOR@' : VERSION_MINOR,
'@VERSION_PATCH@' : VERSION_PATCH,
- '@VERSION_STRING@' : VERSION_STRING,
+ '@VERSION_STRING@' : '"' + VERSION_STRING + '"',
'@uintmax_t_decl@': "",
'@uintptr_t_decl@': "",
'@off_t_decl@' : 'typedef int64_t wt_off_t;' if env.TargetOSIs('windows')
@@ -233,4 +234,4 @@ wtbin = wtbinEnv.Program(
source=Glob("src/utilities/*.c"),
LIBDEPS=["wiredtiger"],
AIB_COMPONENT="dist-test",
-)
+) \ No newline at end of file