From 8c067fed75dd4d986e61d6a675ba7133a4dce3a7 Mon Sep 17 00:00:00 2001 From: Daniel Moody Date: Fri, 28 Jan 2022 11:53:40 -0600 Subject: SERVER-62903 switch to using cmake config for generating version information --- src/third_party/wiredtiger/SConscript | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/third_party/wiredtiger') 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 -- cgit v1.2.1