diff options
author | Dominic Hargreaves <dom@earth.li> | 2016-04-21 22:23:25 +0100 |
---|---|---|
committer | Dominic Hargreaves <dom@earth.li> | 2016-04-21 23:08:12 +0100 |
commit | fab07d6b75d8ddd9735b4bc02a57bf23cda5330f (patch) | |
tree | 197e69f638c01ac790acda471a7c1383e6dd6c34 /CMakeLists.txt | |
parent | 8b6e17fe7e706ce87e700a4962d450d9cdeac85f (diff) |
Optionally strip variable build date from compiled program
To aid build reproducibility, don't include the build date/time if
-DREPRODUCIBLE_BUILD is defined.
Based on the patch provided by Alexis Bienvenüe in the Debian report.
Bug-Debian: https://bugs.debian.org/820152
Patch-Name: reproducible_datetime.diff
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b5d1d381b..595a12456 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) |