summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt5
-rw-r--r--include/anope.h2
-rw-r--r--src/misc.cpp4
3 files changed, 11 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1705ac733..9e05bffb8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -67,6 +67,11 @@ endif()
# Use the following directories as includes
include_directories(${Anope_BINARY_DIR}/include ${Anope_SOURCE_DIR}/include)
+# 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)
diff --git a/include/anope.h b/include/anope.h
index f3f05cb15..49e7c7ddc 100644
--- a/include/anope.h
+++ b/include/anope.h
@@ -350,7 +350,9 @@ namespace Anope
template<typename T> using hash_map = std::unordered_map<string, T, hash_ci, compare_ci>;
template<typename T> using locale_hash_map = std::unordered_map<string, T, hash_locale, compare_locale>;
+#ifndef REPRODUCIBLE_BUILD
static const char *const compiled = __TIME__ " " __DATE__;
+#endif
/** The time Anope started.
*/
diff --git a/src/misc.cpp b/src/misc.cpp
index dc8d68f43..3b306de07 100644
--- a/src/misc.cpp
+++ b/src/misc.cpp
@@ -592,7 +592,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