diff --git a/sdk/include/reactos/version.cmake b/sdk/include/reactos/version.cmake index 0ca632f2b7c..4566a6a0ef7 100644 --- a/sdk/include/reactos/version.cmake +++ b/sdk/include/reactos/version.cmake @@ -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(