1
0
mirror of https://github.com/anope/anope.git synced 2026-06-27 17:06:39 +02:00

Merge pull request #166 from jmdh/2.0-reproducible

Optionally strip variable build date from compiled program
This commit is contained in:
Adam
2016-04-22 10:17:11 -05:00
3 changed files with 11 additions and 0 deletions
+5
View File
@@ -239,6 +239,11 @@ option(USE_PCH "Use precompiled headers" OFF)
# source include directory so the precompiled headers work correctly.
include_directories(${Anope_BINARY_DIR}/include ${Anope_SOURCE_DIR}/include ${Anope_BINARY_DIR}/language ${Anope_SOURCE_DIR}/modules/pseudoclients)
# Pass on REPRODUCIBLE_BUILD
if(REPRODUCIBLE_BUILD)
add_definitions(-DREPRODUCIBLE_BUILD)
endif(REPRODUCIBLE_BUILD)
# If using Windows, always add the _WIN32 define
if(WIN32)
add_definitions(-D_WIN32)
+2
View File
@@ -336,7 +336,9 @@ namespace Anope
template<typename T> class multimap : public std::multimap<string, T, ci::less> { };
template<typename T> class hash_map : public TR1NS::unordered_map<string, T, hash_ci, compare> { };
#ifndef REPRODUCIBLE_BUILD
static const char *const compiled = __TIME__ " " __DATE__;
#endif
/** The time Anope started.
*/
+4
View File
@@ -632,7 +632,11 @@ Anope::string Anope::VersionShort()
Anope::string Anope::VersionBuildString()
{
#ifdef REPRODUCIBLE_BUILD
Anope::string s = "build #" + stringify(BUILD);
#else
Anope::string s = "build #" + stringify(BUILD) + ", compiled " + Anope::compiled;
#endif
Anope::string flags;
#ifdef DEBUG_BUILD