How to use H5Version.hpp.in
to access HIGHFIVE_VERSION_*
definitions
#778
-
I've cloned HighFive and have been using it with my project. For my project, it would be nice to track group creation order but it is not required. Since this feature was added in 2.7.0 I would like something like this: HighFive::GroupCreateProps properties{};
#if HIGHFIVE_VERSION_MAJOR > 2 && HIGHFIVE_VERSION_MINOR > 7
properties.add(HighFive::LinkCreationOrder(HighFive::CreationOrder::Tracked | HighFive::CreationOrder::Indexed));
#endif
auto sensor_record_group = metrics_group.createGroup("SensorRecord", properties); So we only try to compile the features if the correct version is available. I see that these definitions exist in the file HighFive/include/highfive/H5Version.hpp.in Lines 11 to 13 in be68bd0 From this Stack Overflow question it seems like the files Could anyone provide some guidance on how to properly use this file? For context, I have HighFive as a submodule for my project and am developing on a Windows machine. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
The
I'd suggest you first try if you're lucky and just include the above file and use the macros If that doesn't work the most likely reason is that the file hasn't been generated (e.g. if your project doesn't use CMake or doesn't have a
|
Beta Was this translation helpful? Give feedback.
The first three lines are good, you don't need any of that. (You might want to also remove Boost support; we can do that later.)
The line
should trigger the
configure_file
. (Unrelated: check theBASE_DIR
it should probably be someCMAKE_*_DIR
.) Theadd_subdirectory
should also make the targetHighFive
available. You'd use it as followsPlease remove
${HIGHFIVE_INCLUDE_DIRS}
from:Generally, this isn't modern cmake; an…