diff options
author | Luke Chen <luke.chen@mongodb.com> | 2021-12-30 14:14:01 +1100 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-12-30 03:47:13 +0000 |
commit | 580780da6d4d3559a83aec5774d95128d8dbf112 (patch) | |
tree | 7d9debd7df946b8fbe7b4dc3230821ceefa8e85e | |
parent | c8c8fb59fbc3f135cf3281d980b3dee85c4fbb7c (diff) | |
download | mongo-580780da6d4d3559a83aec5774d95128d8dbf112.tar.gz |
Import wiredtiger: e29560bb0960e89d3edf62695257190a4e749f8f from branch mongodb-5.2
ref: a9197f1480..e29560bb09
for: 5.2.0-rc4
WT-8542 Generate CMake version config file using s_version
-rw-r--r-- | src/third_party/wiredtiger/cmake/configs/base.cmake | 11 | ||||
-rw-r--r-- | src/third_party/wiredtiger/cmake/configs/version.cmake | 5 | ||||
-rwxr-xr-x | src/third_party/wiredtiger/dist/s_version | 95 | ||||
-rw-r--r-- | src/third_party/wiredtiger/import.data | 2 |
4 files changed, 71 insertions, 42 deletions
diff --git a/src/third_party/wiredtiger/cmake/configs/base.cmake b/src/third_party/wiredtiger/cmake/configs/base.cmake index 6f77ebcd632..10edeed27c0 100644 --- a/src/third_party/wiredtiger/cmake/configs/base.cmake +++ b/src/third_party/wiredtiger/cmake/configs/base.cmake @@ -7,6 +7,7 @@ # include(cmake/helpers.cmake) +include(cmake/configs/version.cmake) # WiredTiger-related configuration options. @@ -200,27 +201,25 @@ config_string( config_string( VERSION_MAJOR "Major version number for WiredTiger" - DEFAULT 10 + DEFAULT ${WT_VERSION_MAJOR} ) config_string( VERSION_MINOR "Minor version number for WiredTiger" - DEFAULT 0 + DEFAULT ${WT_VERSION_MINOR} ) config_string( VERSION_PATCH "Path version number for WiredTiger" - DEFAULT 1 + DEFAULT ${WT_VERSION_PATCH} ) - -string(TIMESTAMP config_date "%Y-%m-%d") config_string( VERSION_STRING "Version string for WiredTiger" - DEFAULT "\"WiredTiger ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH} (${config_date})\"" + DEFAULT "\"${WT_VERSION_STRING}\"" ) if(HAVE_DIAGNOSTIC AND (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Debug")) diff --git a/src/third_party/wiredtiger/cmake/configs/version.cmake b/src/third_party/wiredtiger/cmake/configs/version.cmake new file mode 100644 index 00000000000..714da8bb3de --- /dev/null +++ b/src/third_party/wiredtiger/cmake/configs/version.cmake @@ -0,0 +1,5 @@ +# Generated by dist/s_version. Do not modify. +set(WT_VERSION_MAJOR 10) +set(WT_VERSION_MINOR 0) +set(WT_VERSION_PATCH 2) +set(WT_VERSION_STRING "WiredTiger 10.0.2: (December 21, 2021)") diff --git a/src/third_party/wiredtiger/dist/s_version b/src/third_party/wiredtiger/dist/s_version index a09aebd282a..a53995b18a3 100755 --- a/src/third_party/wiredtiger/dist/s_version +++ b/src/third_party/wiredtiger/dist/s_version @@ -6,6 +6,7 @@ m4dir=../build_posix/aclocal rpmspec=./package/wiredtiger.spec tmp_file=__tmp +cmakedir=../cmake/configs force=no while : @@ -18,42 +19,66 @@ while : esac done -# If the version hasn't changed and we're not forcing the issue, we're done. -if test "$force" = no -a \ - -f $m4dir/version.m4 -a \ - -f $m4dir/version-set.m4 ; then - eval `grep '^VERSION_[A-Z]*=' $m4dir/version-set.m4` - if test x${WIREDTIGER_VERSION_MAJOR} = x${VERSION_MAJOR} -a \ - x${WIREDTIGER_VERSION_MINOR} = x${VERSION_MINOR} -a \ - x${WIREDTIGER_VERSION_PATCH} = x${VERSION_PATCH} ; then - exit 0 +GenAutoconfVersion(){ + # If the version hasn't changed and we're not forcing the issue, we're done. + if test "$force" = no -a \ + -f $m4dir/version.m4 -a \ + -f $m4dir/version-set.m4 ; then + eval `grep '^VERSION_[A-Z]*=' $m4dir/version-set.m4` + if test x${WIREDTIGER_VERSION_MAJOR} = x${VERSION_MAJOR} -a \ + x${WIREDTIGER_VERSION_MINOR} = x${VERSION_MINOR} -a \ + x${WIREDTIGER_VERSION_PATCH} = x${VERSION_PATCH} ; then + return + fi fi -fi - -dotted_version=${WIREDTIGER_VERSION_MAJOR}.${WIREDTIGER_VERSION_MINOR}.${WIREDTIGER_VERSION_PATCH} -echo "Building $m4dir/version.m4" -cat <<EOF > $m4dir/version.m4 -dnl WiredTiger product version for AC_INIT. Maintained by dist/s_version -${dotted_version} -EOF - -echo "Building $m4dir/version-set.m4" -cat <<EOF > $m4dir/version-set.m4 -dnl build by dist/s_version - -VERSION_MAJOR=${WIREDTIGER_VERSION_MAJOR} -VERSION_MINOR=${WIREDTIGER_VERSION_MINOR} -VERSION_PATCH=${WIREDTIGER_VERSION_PATCH} -VERSION_STRING='"${WIREDTIGER_VERSION_STRING}"' - -AC_SUBST(VERSION_MAJOR) -AC_SUBST(VERSION_MINOR) -AC_SUBST(VERSION_PATCH) -AC_SUBST(VERSION_STRING) - -VERSION_NOPATCH=${WIREDTIGER_VERSION_MAJOR}.${WIREDTIGER_VERSION_MINOR} -AC_SUBST(VERSION_NOPATCH) -EOF + dotted_version=${WIREDTIGER_VERSION_MAJOR}.${WIREDTIGER_VERSION_MINOR}.${WIREDTIGER_VERSION_PATCH} + echo "Building $m4dir/version.m4" + cat > $m4dir/version.m4 <<-END + dnl WiredTiger product version for AC_INIT. Maintained by dist/s_version + ${dotted_version} + END + + echo "Building $m4dir/version-set.m4" + cat > $m4dir/version-set.m4 <<-END + dnl build by dist/s_version + + VERSION_MAJOR=${WIREDTIGER_VERSION_MAJOR} + VERSION_MINOR=${WIREDTIGER_VERSION_MINOR} + VERSION_PATCH=${WIREDTIGER_VERSION_PATCH} + VERSION_STRING='"${WIREDTIGER_VERSION_STRING}"' + + AC_SUBST(VERSION_MAJOR) + AC_SUBST(VERSION_MINOR) + AC_SUBST(VERSION_PATCH) + AC_SUBST(VERSION_STRING) + + VERSION_NOPATCH=${WIREDTIGER_VERSION_MAJOR}.${WIREDTIGER_VERSION_MINOR} + AC_SUBST(VERSION_NOPATCH) + END +} + +GenCmakeVersion(){ + if test "$force" = no -a \ + -f $cmakedir/version.cmake ; then + eval `sed -n -e 's/^set(\(WT_VERSION_[A-Z]*\) \([0-9]*\))$/\1=\2/p' $cmakedir/version.cmake` + if test x${WIREDTIGER_VERSION_MAJOR} = x${WT_VERSION_MAJOR} -a \ + x${WIREDTIGER_VERSION_MINOR} = x${WT_VERSION_MINOR} -a \ + x${WIREDTIGER_VERSION_PATCH} = x${WT_VERSION_PATCH} ; then + return + fi + fi + echo "Building $cmakedir/version.cmake" + cat > $cmakedir/version.cmake <<-END + # Generated by dist/s_version. Do not modify. + set(WT_VERSION_MAJOR ${WIREDTIGER_VERSION_MAJOR}) + set(WT_VERSION_MINOR ${WIREDTIGER_VERSION_MINOR}) + set(WT_VERSION_PATCH ${WIREDTIGER_VERSION_PATCH}) + set(WT_VERSION_STRING "${WIREDTIGER_VERSION_STRING}") + END +} + +GenAutoconfVersion +GenCmakeVersion echo "Building $rpmspec" sed -e "s/Version: .*/Version: ${dotted_version}/" $rpmspec \ diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index 0e38f29b46e..6876715491f 100644 --- a/src/third_party/wiredtiger/import.data +++ b/src/third_party/wiredtiger/import.data @@ -2,5 +2,5 @@ "vendor": "wiredtiger", "github": "wiredtiger/wiredtiger.git", "branch": "mongodb-5.2", - "commit": "a9197f1480f65355eaf9e16812e5fd7e8f591eab" + "commit": "e29560bb0960e89d3edf62695257190a4e749f8f" } |