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.
This commit is contained in:
Amy Tai 2018-08-03 10:03:54 -04:00 committed by amytai
parent 7f8d17db24
commit 1f0897fc3d
2 changed files with 9 additions and 0 deletions

View File

@ -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)

View File

@ -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 */