diff options
author | Sadie Powell <sadie@witchery.services> | 2025-03-06 01:23:14 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2025-03-06 01:24:39 +0000 |
commit | 2091dc68bc0bbb8fe29c8123fd59f9f42dc22737 (patch) | |
tree | e68931a36731900e3e64deebc83171c4028c6c34 | |
parent | 9926ac5a05ba741690f51a3265f2523a9e43a5c7 (diff) |
Move REPRODUCIBLE_BUILD to sysconf.
-rw-r--r-- | CMakeLists.txt | 5 | ||||
-rw-r--r-- | include/sysconf.h.cmake | 3 | ||||
-rw-r--r-- | src/misc.cpp | 5 |
3 files changed, 7 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 65553c241..e86e73998 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -142,11 +142,6 @@ include_directories( ${Anope_SOURCE_DIR}/vendor ) -# Pass on REPRODUCIBLE_BUILD -if(REPRODUCIBLE_BUILD) - add_definitions(-DREPRODUCIBLE_BUILD) -endif() - if(WIN32) # If using Windows, include the windows specific folder for anope_windows.h include_directories(${Anope_SOURCE_DIR}/src/win32) diff --git a/include/sysconf.h.cmake b/include/sysconf.h.cmake index 71290dfca..fb6a87fcd 100644 --- a/include/sysconf.h.cmake +++ b/include/sysconf.h.cmake @@ -44,6 +44,9 @@ // Whether the umask() function is available. #cmakedefine01 HAVE_UMASK +// Whether Anope was built in a reproducible way. +#cmakedefine01 REPRODUCIBLE_BUILD + #ifdef _WIN32 # define popen _popen # define pclose _pclose diff --git a/src/misc.cpp b/src/misc.cpp index 6f0d95833..4832fabcb 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -590,7 +590,7 @@ Anope::string Anope::VersionShort() Anope::string Anope::VersionBuildString() { -#ifdef REPRODUCIBLE_BUILD +#if REPRODUCIBLE_BUILD Anope::string s = "build #" + Anope::ToString(BUILD); #else Anope::string s = "build #" + Anope::ToString(BUILD) + ", compiled " + Anope::compiled; @@ -603,6 +603,9 @@ Anope::string Anope::VersionBuildString() #ifdef VERSION_GIT flags += "G"; #endif +#if REPRODUCIBLE_BUILD + flags += "R" +#endif #ifdef _WIN32 flags += "W"; #endif |