Skip to content

How to use H5Version.hpp.in to access HIGHFIVE_VERSION_* definitions #778

Answered by 1uc
Schellenberg3 asked this question in Questions
Discussion options

You must be logged in to vote

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

add_subdirectory(${BASE_DIR}/deps/HighFive)

should trigger the configure_file. (Unrelated: check the BASE_DIR it should probably be some CMAKE_*_DIR.) The add_subdirectory should also make the target HighFive available. You'd use it as follows

add_executable(runme ...)
target_link_libraries(runme PUBLIC HighFive)

add_library(linkme ...)
target_link_libraries(linkme [PRIVATE,PUBLIC] HighFive)

Please remove ${HIGHFIVE_INCLUDE_DIRS} from:

include_directories(
    # Other includes ...
    ${HIGHFIVE_INCLUDE_DIRS}
)

Generally, this isn't modern cmake; an…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Schellenberg3
Comment options

@1uc
Comment options

Answer selected by Schellenberg3
@Schellenberg3
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants