[CMAKE] Add a NO_REACTOS_BUILDNO option

This allows to not generate buildno.h and version.h after each commit and trigger the relinking of the complete module list
This commit is contained in:
Jérôme Gardou 2020-11-30 14:43:26 +01:00
parent 7ae3d530db
commit 5d4ece342c

View file

@ -1,4 +1,10 @@
string(TIMESTAMP KERNEL_VERSION_BUILD %Y%m%d UTC)
option(NO_REACTOS_BUILDNO "If true, disables the generation of buildno.h and version.h for each configure" OFF)
if (NOT NO_REACTOS_BUILDNO)
string(TIMESTAMP KERNEL_VERSION_BUILD %Y%m%d UTC)
else()
set(KERNEL_VERSION_BUILD "custom")
endif()
set(KERNEL_VERSION_MAJOR "0")
set(KERNEL_VERSION_MINOR "4")
@ -24,7 +30,7 @@ endif()
set(COMMIT_HASH "unknown-hash")
set(REVISION "unknown-revision")
if(EXISTS "${REACTOS_SOURCE_DIR}/.git")
if((EXISTS "${REACTOS_SOURCE_DIR}/.git") AND (NOT NO_REACTOS_BUILDNO))
find_package(Git)
if(GIT_FOUND)
execute_process(