1 #ifndef CORELIB___VERSION__HPP
2 #define CORELIB___VERSION__HPP
51 #ifndef NCBI_BUILD_TIME
52 # define NCBI_BUILD_TIME __DATE__ " " __TIME__
56 # define NCBI_BUILD_TAG_PROXY NCBI_AS_STRING(NCBI_BUILD_TAG)
58 # define NCBI_BUILD_TAG_PROXY ""
62 #ifndef NCBI_TEAMCITY_PROJECT_NAME_SBUILDINFO
63 # define NCBI_TEAMCITY_PROJECT_NAME_SBUILDINFO \
64 .Extra(SBuildInfo::eTeamCityProjectName, NCBI_TEAMCITY_PROJECT_NAME_PROXY)
65 # define NCBI_TEAMCITY_BUILDCONF_NAME_SBUILDINFO \
66 .Extra(SBuildInfo::eTeamCityBuildConf, NCBI_TEAMCITY_BUILDCONF_NAME_PROXY)
67 # define NCBI_TEAMCITY_BUILD_NUMBER_SBUILDINFO \
68 .Extra(SBuildInfo::eTeamCityBuildNumber, NCBI_TEAMCITY_BUILD_NUMBER_PROXY)
69 # define NCBI_SUBVERSION_REVISION_SBUILDINFO \
70 .Extra(SBuildInfo::eSubversionRevision, NCBI_SUBVERSION_REVISION_PROXY)
71 # define NCBI_SC_VERSION_SBUILDINFO \
72 .Extra(SBuildInfo::eStableComponentsVersion, NCBI_SC_VERSION_PROXY)
76 #ifndef NCBI_SRCTREE_VER_SBUILDINFO
77 # ifdef NCBI_SRCTREE_NAME_PROXY
78 # define NCBI_SRCTREE_VER_SBUILDINFO \
79 .Extra(NCBI_SRCTREE_NAME_PROXY, NCBI_SRCTREE_VER_PROXY)
81 # define NCBI_SRCTREE_VER_SBUILDINFO
85 #ifdef NCBI_APP_BUILT_AS
86 # define NCBI_BUILT_AS_SBUILDINFO \
87 .Extra(SBuildInfo::eBuiltAs, NCBI_AS_STRING(NCBI_APP_BUILT_AS))
89 # define NCBI_BUILT_AS_SBUILDINFO
92 #ifdef NCBI_TEAMCITY_BUILD_ID
93 # define NCBI_BUILD_ID NCBI_TEAMCITY_BUILD_ID
94 #elif defined(NCBI_BUILD_SESSION_ID)
95 # define NCBI_BUILD_ID NCBI_AS_STRING(NCBI_BUILD_SESSION_ID)
98 # define NCBI_BUILD_ID_SBUILDINFO .Extra(SBuildInfo::eBuildID, NCBI_BUILD_ID)
100 # define NCBI_BUILD_ID_SBUILDINFO
103 #define NCBI_SBUILDINFO_DEFAULT_IMPL() \
104 NCBI_SBUILDINFO_DEFAULT_INSTANCE() \
105 NCBI_TEAMCITY_PROJECT_NAME_SBUILDINFO \
106 NCBI_TEAMCITY_BUILDCONF_NAME_SBUILDINFO \
107 NCBI_TEAMCITY_BUILD_NUMBER_SBUILDINFO \
108 NCBI_BUILD_ID_SBUILDINFO \
109 NCBI_GIT_BRANCH_SBUILDINFO \
110 NCBI_REVISION_SBUILDINFO \
111 NCBI_SUBVERSION_REVISION_SBUILDINFO \
112 NCBI_SC_VERSION_SBUILDINFO \
113 NCBI_SRCTREE_VER_SBUILDINFO \
114 NCBI_BUILT_AS_SBUILDINFO
116 #if defined(NCBI_USE_PCH) && !defined(NCBI_TEAMCITY_BUILD_NUMBER)
117 #define NCBI_SBUILDINFO_DEFAULT() SBuildInfo()
119 #define NCBI_SBUILDINFO_DEFAULT() NCBI_SBUILDINFO_DEFAULT_IMPL()
121 #define NCBI_APP_SBUILDINFO_DEFAULT() NCBI_SBUILDINFO_DEFAULT_IMPL()
123 #ifdef NCBI_SBUILDINFO_DEFAULT_INSTANCE
124 # undef NCBI_SBUILDINFO_DEFAULT_INSTANCE
126 #define NCBI_SBUILDINFO_DEFAULT_INSTANCE() SBuildInfo(NCBI_BUILD_TIME, NCBI_BUILD_TAG_PROXY)
131 #ifdef CComponentVersionInfo
132 # undef CComponentVersionInfo
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
void AddComponentVersion(const string &component_name, int ver_major, int ver_minor, int patch_level=0, const string &ver_name=kEmptyStr, const SBuildInfo &build_info=SBuildInfo(__DATE__ " " __TIME__, "") .Extra(SBuildInfo::eTeamCityProjectName, NCBI_TEAMCITY_PROJECT_NAME_PROXY) .Extra(SBuildInfo::eTeamCityBuildConf, NCBI_TEAMCITY_BUILDCONF_NAME_PROXY) .Extra(SBuildInfo::eTeamCityBuildNumber, NCBI_TEAMCITY_BUILD_NUMBER_PROXY) NCBI_GIT_BRANCH_SBUILDINFO NCBI_REVISION_SBUILDINFO .Extra(SBuildInfo::eSubversionRevision, NCBI_SUBVERSION_REVISION_PROXY) .Extra(SBuildInfo::eStableComponentsVersion, NCBI_SC_VERSION_PROXY))
Add component version information.
CVersion(const CVersionInfo &version, const SBuildInfo &build_info=SBuildInfo(__DATE__ " " __TIME__, "") .Extra(SBuildInfo::eTeamCityProjectName, NCBI_TEAMCITY_PROJECT_NAME_PROXY) .Extra(SBuildInfo::eTeamCityBuildConf, NCBI_TEAMCITY_BUILDCONF_NAME_PROXY) .Extra(SBuildInfo::eTeamCityBuildNumber, NCBI_TEAMCITY_BUILD_NUMBER_PROXY) NCBI_GIT_BRANCH_SBUILDINFO NCBI_REVISION_SBUILDINFO .Extra(SBuildInfo::eSubversionRevision, NCBI_SUBVERSION_REVISION_PROXY) .Extra(SBuildInfo::eStableComponentsVersion, NCBI_SC_VERSION_PROXY))
CVersion(const CVersion &version)
CComponentVersionInfo(const string &component_name, const string &version, const string &ver_name=kEmptyStr, const SBuildInfo &build_info=SBuildInfo(__DATE__ " " __TIME__, "") .Extra(SBuildInfo::eTeamCityProjectName, NCBI_TEAMCITY_PROJECT_NAME_PROXY) .Extra(SBuildInfo::eTeamCityBuildConf, NCBI_TEAMCITY_BUILDCONF_NAME_PROXY) .Extra(SBuildInfo::eTeamCityBuildNumber, NCBI_TEAMCITY_BUILD_NUMBER_PROXY) NCBI_GIT_BRANCH_SBUILDINFO NCBI_REVISION_SBUILDINFO .Extra(SBuildInfo::eSubversionRevision, NCBI_SUBVERSION_REVISION_PROXY) .Extra(SBuildInfo::eStableComponentsVersion, NCBI_SC_VERSION_PROXY))
Constructor.
CComponentVersionInfo(const string &component_name, int ver_major, int ver_minor, int patch_level=0, const string &ver_name=kEmptyStr, const SBuildInfo &build_info=SBuildInfo(__DATE__ " " __TIME__, "") .Extra(SBuildInfo::eTeamCityProjectName, NCBI_TEAMCITY_PROJECT_NAME_PROXY) .Extra(SBuildInfo::eTeamCityBuildConf, NCBI_TEAMCITY_BUILDCONF_NAME_PROXY) .Extra(SBuildInfo::eTeamCityBuildNumber, NCBI_TEAMCITY_BUILD_NUMBER_PROXY) NCBI_GIT_BRANCH_SBUILDINFO NCBI_REVISION_SBUILDINFO .Extra(SBuildInfo::eSubversionRevision, NCBI_SUBVERSION_REVISION_PROXY) .Extra(SBuildInfo::eStableComponentsVersion, NCBI_SC_VERSION_PROXY))
Constructor.
void AddComponentVersion(const string &component_name, int ver_major, int ver_minor, int patch_level, const string &ver_name, const SBuildInfo &build_info)
Add component version information.
CVersion(const SBuildInfo &build_info=SBuildInfo(__DATE__ " " __TIME__, "") .Extra(SBuildInfo::eTeamCityProjectName, NCBI_TEAMCITY_PROJECT_NAME_PROXY) .Extra(SBuildInfo::eTeamCityBuildConf, NCBI_TEAMCITY_BUILDCONF_NAME_PROXY) .Extra(SBuildInfo::eTeamCityBuildNumber, NCBI_TEAMCITY_BUILD_NUMBER_PROXY) NCBI_GIT_BRANCH_SBUILDINFO NCBI_REVISION_SBUILDINFO .Extra(SBuildInfo::eSubversionRevision, NCBI_SUBVERSION_REVISION_PROXY) .Extra(SBuildInfo::eStableComponentsVersion, NCBI_SC_VERSION_PROXY))
#define NCBI_SBUILDINFO_DEFAULT()
const string version
version string
This class allows to add build info (date and tag) to application version.