-
Notifications
You must be signed in to change notification settings - Fork 511
ENH: Include defined constants for current library version #173
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
Conversation
b2b2379
to
cc3dc3c
Compare
Hm, I've added CMAKE_BINARY_DIR as include directory in a force push to resolve the build errors. Does force-pushing mess up CI? Edit: Nevermind, something else seems to be wrong. |
Sorry, I didn't mean to close the pull request. Back from holidays and all that. |
Thanks for the contribution! It looks like all the build jobs are failing with some variation of
Maybe |
You were right, I hadn't installed |
This will be very helpful for ensuring the correct version of |
@@ -99,7 +103,6 @@ set(LIB_SOURCE_FILES | |||
src/h3lib/include/constants.h | |||
src/h3lib/include/coordijk.h | |||
src/h3lib/include/algos.h | |||
src/h3lib/include/h3api.h |
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.
I haven't tested this, but will this still cause clang format to auto format h3api.h?
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.
Good catch, it wont be auto formatted.
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.
Should this line still be removed?
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.
It's now autoformatting h3api.h.in
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.
There might be a smarter way, the line is removed such that cmake doesn't try to format a non-existent file. The generated h3api.h is still added to the library (using the var CONFIGURED_API_HEADER
).
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.
Ok, thanks!
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.
LGTM, thanks for addressing the comments.
@@ -99,7 +103,6 @@ set(LIB_SOURCE_FILES | |||
src/h3lib/include/constants.h | |||
src/h3lib/include/coordijk.h | |||
src/h3lib/include/algos.h | |||
src/h3lib/include/h3api.h |
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.
Ok, thanks!
I've added a test, which failed, and fixed the formatting error causing the problem. |
ENH: Include defined constants for current library version
Resolves #148.
Splits version string in CMakeLists.txt and configures a new header file,
version.h
, with number constants.