Skip to content
Permalink
Browse files

Merge pull request #393 from arogge/dev/arogge/master/fix-cmake-times…

…tamp

cmake: Use date command on cmake <3.10 so %B works
  • Loading branch information
arogge committed Jan 13, 2020
2 parents d8f9641 + ffa0d4f commit 6e54535787b1ad0ddce8b0eb9100f934afc32605
Showing with 2 additions and 2 deletions.
  1. +2 −2 core/cmake/BareosTimeFunctions.cmake
@@ -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)
@@ -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()

0 comments on commit 6e54535

Please sign in to comment.
You can’t perform that action at this time.