Skip to content

Commit

Permalink
fix: display-correct-version-in-help-string
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaDucak committed Dec 26, 2023
1 parent 82cbd69 commit 303dcd0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Build
run: |
mkdir build && cd build
cmake .. && make
cmake -DCAPS_LOG_VERSION="${{ needs.create-release.outputs.version }}" .. && make
- name: Archive and Upload binaries to release
run: |
Expand All @@ -71,7 +71,7 @@ jobs:
- name: Build for MacOS
run: |
mkdir build-macos && cd build-macos
cmake .. && make
cmake -DCAPS_LOG_VERSION="${{ needs.create-release.outputs.version }}" .. && make
- name: Archive and Upload MacOS binaries to release
run: |
Expand Down
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
cmake_minimum_required(VERSION 3.14)

# If version number is not provided, just use a dummy
if(NOT CAPS_LOG_VERSION)
set(CAPS_LOG_VERSION "development")
endif()

# Project setup
project(caps-log
LANGUAGES CXX
VERSION 1.0.0
)

set(CMAKE_CXX_STANDARD 17)
Expand Down
2 changes: 1 addition & 1 deletion source/version.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
// Propagating PROJECT_VERSION cmake variable to caps log source code to be used where needed
#ifndef CAPS_LOG_VERSION
# undef CAPS_LOG_VERSION
# define CAPS_LOG_VERSION "@PROJECT_VERSION@"
# define CAPS_LOG_VERSION "@CAPS_LOG_VERSION@"
#endif

0 comments on commit 303dcd0

Please sign in to comment.