Skip to content

The problem when I install HighFive by cmake #1047

Closed Answered by 1uc
dirichlet10 asked this question in Questions
Discussion options

You must be logged in to vote

Are you editing HighFives CMakeLists.txt? If no, ignore everything that follows.

If yes, I could see how that would result in the error you're describing. The problem is that inside HighFive/CMakeLists.txt we create the targets HighFive::HighFive and HighFive::Include. The find_package(HighFive REQUIRED) instructs CMake to go look for HighFive, it finds one in the install directory. It then asks the installed version to create the targets, which already exist. Therefore, it fails.

There's two options:

  1. You're developing HighFive. In that case just leave out the find_package(HighFive REQUIRED).

  2. You're developing an independent application, but are reusing the HighFive's CMake for some r…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@1uc
Comment options

Answer selected by dirichlet10
@dirichlet10
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants