https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5d4ece342c418eb85cb718d4b77e7bec15eb7611

commit 5d4ece342c418eb85cb718d4b77e7bec15eb7611
Author:     Jérôme Gardou <[email protected]>
AuthorDate: Mon Nov 30 14:43:26 2020 +0100
Commit:     Jérôme Gardou <[email protected]>
CommitDate: Mon Dec 7 11:32:37 2020 +0100

    [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
---
 sdk/include/reactos/version.cmake | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

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(

Reply via email to