From 1f0897fc3de460aba6cf8e52d60c7b9f2fbf7cfe Mon Sep 17 00:00:00 2001 From: Amy Tai Date: Fri, 3 Aug 2018 10:03:54 -0400 Subject: [PATCH] Add some system information during build time, including install method Set variables describing system-specific information during build time, so that they can be collected and reported by a diagnostic thread. --- CMakeLists.txt | 3 +++ src/version.h.in | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7420776cf..bf8ffe91f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,9 @@ else () set(PROJECT_VERSION_MOD ${VERSION}) endif () +set(PROJECT_INSTALL_METHOD source CACHE STRING "Specify what install platform this binary +is built for") + if (NOT CMAKE_BUILD_TYPE) # Default to Release builds set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel" FORCE) diff --git a/src/version.h.in b/src/version.h.in index d8f87efc0..b23b8b0e5 100644 --- a/src/version.h.in +++ b/src/version.h.in @@ -7,5 +7,11 @@ #define TIMESCALEDB_MINOR_VERSION "@PROJECT_VERSION_MINOR@" #define TIMESCALEDB_PATCH_VERSION "@PROJECT_VERSION_PATCH@" #define TIMESCALEDB_MOD_VERSION "@VERSION_MOD@" +#define BUILD_OS_NAME "@CMAKE_SYSTEM_NAME@" +#define BUILD_OS_VERSION "@CMAKE_SYSTEM_VERSION@" +#define PG_VERSION "@PG_VERSION@" +// Value should be set in package release scripts. Otherwise +// defaults to "source" +#define TIMESCALEDB_INSTALL_METHOD "@PROJECT_INSTALL_METHOD@" #endif /* TIMESCALEDB_VERSION_H */