Tests: make tests pass with SOURCE_DATE_EPOCH set

Fix tests to account for commit 243aed52 (cmTimestamp: Support
SOURCE_DATE_EPOCH to override current time, 2017-01-25).

In openSUSE we are running the test-suite as part of the build and that
failed in these two places when building everything with
`SOURCE_DATE_EPOCH` set.
This commit is contained in:
Bernhard M. Wiedemann 2017-01-29 11:52:55 +01:00 committed by Brad King
parent 84963f429a
commit 5181f1f86a
2 changed files with 2 additions and 0 deletions

View File

@ -1,6 +1,7 @@
set(STAMP_FILENAME "${CMAKE_CURRENT_BINARY_DIR}/FileTimestamp-Stamp")
set(STAMP_FORMAT "%Y-%m-%d")
unset(ENV{SOURCE_DATE_EPOCH})
string(TIMESTAMP timestamp1 "${STAMP_FORMAT}")
file(WRITE "${STAMP_FILENAME}" "foo")

View File

@ -49,6 +49,7 @@ macro(GET_DATE)
# 01/12/2006 08:55:12
# mm/dd/YYYY HH:MM:SS
#
unset(ENV{SOURCE_DATE_EPOCH})
string(TIMESTAMP "${GD_PREFIX}OV" "%m/%d/%Y %H:%M:%S")
if(${GD_PREFIX}VERBOSE)