Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Masfo committed Sep 30, 2022
1 parent d8c6078 commit ef0da50
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <your target> POST_BUILD
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/buildinc.exe buildnumber.h BuildInc -q
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src
)
```
16 changes: 8 additions & 8 deletions src/buildnumber.h
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
/*
Expand Down

0 comments on commit ef0da50

Please sign in to comment.