-
Notifications
You must be signed in to change notification settings - Fork 41
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
Make sure ARBORX_VERSION and ARBORX_VERSION_STRING always match #1201
Conversation
src/ArborX_Config.hpp.in
Outdated
#define ARBORX_VERSION_MAJOR @ARBORX_VERSION_MAJOR@ | ||
#define ARBORX_VERSION_MINOR @ARBORX_VERSION_MINOR@ | ||
#define ARBORX_VERSION_PATCH @ARBORX_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 sure if we need these, but should not hurt.
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.
One caveat is that it does not let us express that breaking changes occurred since 1.7
Also please add a static_assert(0 <= ARBORX_VERSION_MAJOR && ARBORX_VERSION_MAJOR <= 99);
// ...
static_assert(ARBORX_VERSION == ARBORX_VERSION_MAJOR * 10000 + ...); |
Yes. I am not sure how to express that. Or any breaking changes in the future. Other than through version major. |
ac40b2e
to
31857fd
Compare
@@ -0,0 +1,21 @@ | |||
#include <ArborX_Config.hpp> |
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 we be including <Arborx.hpp>
instead?
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 think either is fine. ArborX_Config.hpp
is still the top level file at the moment, so users are allowed to include it without including ArborX.hpp
, I think.
#ifndef ARBORX_VERSION | ||
static_assert(false, "ARBORX_VERSION macro is not defined!"); | ||
#endif | ||
|
||
#ifndef ARBORX_VERSION_MAJOR | ||
static_assert(false, "ARBORX_VERSION_MAJOR macro is not defined!"); | ||
#endif | ||
|
||
#ifndef ARBORX_VERSION_MINOR | ||
static_assert(false, "ARBORX_VERSION_MINOR macro is not defined!"); | ||
#endif | ||
|
||
#ifndef ARBORX_VERSION_PATCH | ||
static_assert(false, "ARBORX_VERSION_PATCH macro is not defined!"); | ||
#endif |
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.
These are fine if you really want them but it is covered by the static assertions below.
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.
My last suggestion stands but I am ok with the current state
Follow-up on #1190. Make versions consistent.