Skip to content

Commit

Permalink
build(cmake): set CMAKE_PROJECT_VERSION from PROJECT_VERSION (LizardB…
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher authored Jul 30, 2024
1 parent 459c604 commit 444ca98
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cmake/prep/build_version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ if((DEFINED ENV{BRANCH}) AND (DEFINED ENV{BUILD_VERSION}) AND (DEFINED ENV{COMMI
# If BRANCH is "master" and BUILD_VERSION is not empty, then we are building a master branch
MESSAGE("Got from CI master branch and version $ENV{BUILD_VERSION}")
set(PROJECT_VERSION $ENV{BUILD_VERSION})
set(CMAKE_PROJECT_VERSION ${PROJECT_VERSION}) # cpack will use this to set the binary versions
elseif((DEFINED ENV{BRANCH}) AND (DEFINED ENV{COMMIT}))
# If BRANCH is set but not BUILD_VERSION we are building a PR, we gather only the commit hash
MESSAGE("Got from CI $ENV{BRANCH} branch and commit $ENV{COMMIT}")
Expand Down

0 comments on commit 444ca98

Please sign in to comment.