mirror of
https://github.com/starr-dusT/tzdb_to_nx
synced 2024-03-05 21:18:52 -08:00
cmake: use date -r on more BSDs
- macOS `date` is based on FreeBSD while `-r` is from historical BSD - GNU `date` may not be installed or installed as `gdate`
This commit is contained in:
parent
6ca7f92b0e
commit
c3700819a6
@ -24,7 +24,7 @@ execute_process(
|
||||
|
||||
string(REPLACE "\n" "" TZ_COMMIT_TIME "${TZ_COMMIT_TIME}")
|
||||
|
||||
if (APPLE)
|
||||
if (APPLE OR CMAKE_SYSTEM_NAME MATCHES "DragonFly|FreeBSD|NetBSD|OpenBSD")
|
||||
set(VERSION_COMMAND ${GNU_DATE} -r ${TZ_COMMIT_TIME} +%y%m%d)
|
||||
else ()
|
||||
set(VERSION_COMMAND ${GNU_DATE} +%y%m%d --date=@${TZ_COMMIT_TIME})
|
||||
|
Loading…
Reference in New Issue
Block a user