File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,3 +53,4 @@ test/perftest
5353debug
5454cmake-build-debug
5555/build-afl
56+ .vscode
Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.12 )
2+ if (POLICY CMP0135)
3+ cmake_policy (SET CMP0135 NEW )
4+ set (CMAKE_POLICY_DEFAULT_CMP0135 NEW)
5+ endif ()
6+
7+ file (STRINGS "include/hdr/hdr_histogram_version.h" HDR_VERSION_HEADER )
8+ string (REGEX MATCH ".*#define HDR_HISTOGRAM_VERSION \" (.*)\" .*" HDR_BLACK_HOLE ${HDR_VERSION_HEADER} )
29
310project (hdr_histogram
4- VERSION 0.11.6
11+ VERSION ${CMAKE_MATCH_1}
512 LANGUAGES C
613 DESCRIPTION "C port of the HdrHistogram"
714 HOMEPAGE_URL "http://hdrhistogram.github.io/HdrHistogram/" )
@@ -21,7 +28,7 @@ include(CMakePackageConfigHelpers)
2128
2229set (HDR_SOVERSION_CURRENT 6)
2330set (HDR_SOVERSION_AGE 1)
24- set (HDR_SOVERSION_REVISION 2 )
31+ set (HDR_SOVERSION_REVISION 3 )
2532
2633set (HDR_VERSION ${HDR_SOVERSION_CURRENT} .${HDR_SOVERSION_AGE} .${HDR_SOVERSION_REVISION} )
2734set (HDR_SOVERSION ${HDR_SOVERSION_CURRENT} )
Original file line number Diff line number Diff line change 1+ configure_file (hdr/hdr_histogram_version.h hdr/hdr_histogram_version.h @ONLY )
2+
13set (HDR_HISTOGRAM_PUBLIC_HEADERS
24 hdr/hdr_histogram.h
35 hdr/hdr_histogram_log.h
46 hdr/hdr_interval_recorder.h
57 hdr/hdr_thread.h
68 hdr/hdr_time.h
7- hdr/hdr_writer_reader_phaser.h)
9+ hdr/hdr_writer_reader_phaser.h
10+ hdr/hdr_histogram_version.h)
811
912install (
1013 FILES ${HDR_HISTOGRAM_PUBLIC_HEADERS}
Original file line number Diff line number Diff line change 1+ /**
2+ * @file hdr_histogram_version.h
3+ * @brief Definitions for HdrHistogram's version number.
4+ */
5+
6+ #ifndef HDR_HISTOGRAM_VERSION_H
7+ #define HDR_HISTOGRAM_VERSION_H
8+
9+ #define HDR_HISTOGRAM_VERSION "0.11.7"
10+
11+ #endif // HDR_HISTOGRAM_VERSION_H
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ set -e
3+ # Shell script to update HDR_HISTOGRAM_VERSION_H to a specific version
4+
5+ BASE_DIR=$( cd " $( dirname " $0 " ) /.." && pwd)
6+ HDR_DIR=" $BASE_DIR /include/hdr"
7+ HDR_HISTOGRAM_VERSION_H=$HDR_DIR /hdr_histogram_version.h
8+ NEW_VERSION=$1
9+
10+ if [ " $# " -le 0 ]; then
11+ echo " Error: please provide a version to update to"
12+ exit 1
13+ fi
14+
15+ CURRENT_VERSION=$( grep " #define HDR_HISTOGRAM_VERSION_H" $HDR_HISTOGRAM_VERSION_H | sed -n " s/^.*VERSION_H \" \(.*\)\" /\1/p" )
16+
17+ echo " Comparing $NEW_VERSION with $CURRENT_VERSION "
18+
19+ if [ " $NEW_VERSION " = " $CURRENT_VERSION " ]; then
20+ echo " Skipped because is already on the latest version."
21+ exit 0
22+ fi
23+
24+ echo " Replacing $CURRENT_VERSION with new version $NEW_VERSION "
25+
26+ sed -i ' ' -e " s/#define HDR_HISTOGRAM_VERSION_H \" $CURRENT_VERSION \" /#define HDR_HISTOGRAM_VERSION_H \" $NEW_VERSION \" /g" $HDR_HISTOGRAM_VERSION_H
27+
28+ echo " All done!"
29+
30+ echo " NEW_VERSION=$NEW_VERSION "
You can’t perform that action at this time.
0 commit comments