Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: Use date command on cmake <3.10 so %B works #393

Merged
merged 1 commit into from Jan 13, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions core/cmake/BareosTimeFunctions.cmake
Expand Up @@ -16,7 +16,7 @@
# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

function(timestamp_at at result format)
if(CMAKE_VERSION VERSION_GREATER 3.8.0)
if(CMAKE_VERSION VERSION_GREATER 3.10.0)
set(old_epoch "$ENV{SOURCE_DATE_EPOCH}")
set(ENV{SOURCE_DATE_EPOCH} "${at}")
string(TIMESTAMP out "${format}" UTC)
Expand All @@ -33,7 +33,7 @@ function(timestamp_at at result format)
if(out STREQUAL "")
message(
FATAL_ERROR
"Cannot use SOURCE_DATE_EPOCH (cmake < 3.8) and your 'date' command is not compatible with Bareos' timestamp_at()."
"Cannot use SOURCE_DATE_EPOCH (cmake < 3.10) and your 'date' command is not compatible with Bareos' timestamp_at()."
)
endif()
endif()
Expand Down