NINLIGHT_BUILD_DATE entstand als string(TIMESTAMP) zur Konfigurationszeit,
während die Version seit bf8f76e bei jedem Build neu geschrieben wird -
system/info.build_date konnte dadurch tagealt sein. Das Datum wandert in
cmake/write_version.cmake und damit in denselben generierten Header wie die
Version.
10 lines
589 B
CMake
10 lines
589 B
CMake
# Version *and* build date are regenerated on every build, so the OTA trailer and system/info
|
|
# match the binary. The build date used to be a configure-time string(TIMESTAMP), which left
|
|
# system/info.build_date days behind the actual build after the version generation moved here.
|
|
set(NL_VERSION_HEADER ${CMAKE_BINARY_DIR}/generated/nl_version.h)
|
|
add_custom_target(nl_version ALL
|
|
BYPRODUCTS ${NL_VERSION_HEADER}
|
|
COMMAND ${CMAKE_COMMAND} -DOUT=${NL_VERSION_HEADER} -DSRC=${CMAKE_SOURCE_DIR}
|
|
-P ${CMAKE_SOURCE_DIR}/cmake/write_version.cmake
|
|
COMMENT "Updating nl_version.h")
|