-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#1692: do not error in build if git folder is not available #1693
Conversation
…der is not available
…actually used; a copy in the src folder is used instead
…(the VERSION file). This also allows us to print out the version in the banner, which is useful if not git info is available
|
||
file(READ "VERSION" _vt_version_str) | ||
string(STRIP "${_vt_version_str}" _vt_version_str) | ||
project(vt VERSION ${_vt_version_str}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Version number changes should only be done in the VERSION file now
set(VERSION_PATCH "0") | ||
set(VERSION_MAJOR "${PROJECT_VERSION_MAJOR}") | ||
set(VERSION_MINOR "${PROJECT_VERSION_MINOR}") | ||
set(VERSION_PATCH "${PROJECT_VERSION_PATCH}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not directly related to the PR but I thought I might as well do it with the versioning consistency, but these will now read from the cmake file
fmt::print("{}{}{}", vt_pre, f6, reset); | ||
fmt::print("{}{}{}", vt_pre, f7, reset); | ||
auto vt_version_string = fmt::format("{}.{}.{}", vt_version_major, vt_version_minor, vt_version_patch); | ||
std::array< std::string, 11 > info_lines = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made it easier to add lines to the banner. When we eventually switch to C++17, we won't need to give the number of lines to std::array, it will be able to use CTAD to deduce
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
#1692: do not error in build if git folder is not available
Fixes #1692