From ef0da50dde9cb5a049235949b96b448d49ecc518 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toni=20M=C3=A4kinen?= Date: Fri, 30 Sep 2022 14:28:50 +0300 Subject: [PATCH] Update readme --- CMakeLists.txt | 3 +-- README.md | 9 +++++++-- src/buildnumber.h | 16 ++++++++-------- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dca1282..563111e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,8 +54,7 @@ if (${CMAKE_BUILD_TYPE} MATCHES "Release") COMMENT Run BuildInc and copy to tools COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/bin/buildinc.exe buildnumber.h BuildInc -q WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src - USES_TERMINAL - ) + ) if(GLOBAL_TOOL) diff --git a/README.md b/README.md index 4751d23..2d215af 100644 --- a/README.md +++ b/README.md @@ -12,5 +12,10 @@ Generates C++ header file containing version and build numbers. Also included Example output: https://github.com/Masfo/buildinc/blob/main/src/buildnumber.h -Put in your project pre-build event (e.g.): -![project_build](https://user-images.githubusercontent.com/11275865/147406542-aaa38e95-8743-4fa8-a865-62671f308b50.png) +Example: add custom command to your CMake script to update per build. +```cpp + add_custom_command(TARGET POST_BUILD + COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/buildinc.exe buildnumber.h BuildInc -q + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src + ) +``` \ No newline at end of file diff --git a/src/buildnumber.h b/src/buildnumber.h index 34b8dc3..2aa3d98 100644 --- a/src/buildnumber.h +++ b/src/buildnumber.h @@ -1,5 +1,5 @@ -// AUTOMATICALLY GENERATED BY BUILDINC v0.2.196 TOOL -// LAST BUILD (CMAKE): 2022-09-23 23:38:51 +// AUTOMATICALLY GENERATED BY BUILDINC v0.2.197 TOOL +// LAST BUILD (CMAKE): 2022-09-30 14:26:29 #pragma once @@ -15,15 +15,15 @@ namespace BuildIncVersion constexpr uint32_t minor = 2; // Do not modify these - constexpr uint32_t build = 197; + constexpr uint32_t build = 198; constexpr uint32_t version = major * 10000 + minor * 1000 + build; - constexpr uint64_t random_seed = 0x2bce8cb566860e05; + constexpr uint64_t random_seed = 0xd7733aac6c6674a; - constexpr char version_string[] = "v0.2.197"; - constexpr char build_time_string[] = "2022-09-23 23:38:51"; - constexpr char phrase[] = "cardigan-steersman-panning"; - constexpr char calver[] = "2022.38.197"; + constexpr char version_string[] = "v0.2.198"; + constexpr char build_time_string[] = "2022-09-30 14:26:29"; + constexpr char phrase[] = "enamel-cushy-expire"; + constexpr char calver[] = "2022.39.198"; // Copy paste to import to your project /*