Skip to content

Commit

Permalink
Merge pull request #4 from petterreinholdtsen/reproducable-build
Browse files Browse the repository at this point in the history
Make the build reproducible
  • Loading branch information
bkerler committed Oct 29, 2022
2 parents 0b71400 + ad56749 commit f173e34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ endmacro()
# Handle the generated constants
########################################################################
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c
"import time;print(time.strftime('%a, %d %b %Y %H:%M:%S', time.gmtime()))"
"import os,time,datetime; print(datetime.datetime.utcfromtimestamp(int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))).strftime('%a, %d %b %Y %H:%M:%S'))"
OUTPUT_VARIABLE BUILD_DATE OUTPUT_STRIP_TRAILING_WHITESPACE
)
message(STATUS "Loading build date ${BUILD_DATE} into constants...")
Expand Down

0 comments on commit f173e34

Please sign in to comment.