MultiNest icon indicating copy to clipboard operation
MultiNest copied to clipboard

example_eggbox_C: fix call to FIND_LIBRARY()

Open ajarno-cnrs opened this issue 1 year ago • 1 comments

The call to FIND_LIBRARY() is not correct, it should first take the name of a variable where to store the location of the found library location before the name of the library. This resolves a potential failure of the cmake call which leads to the following error:

CMake Error at src/example_eggbox_C/CMakeLists.txt:7 (FIND_LIBRARY): Could not find m using the following names:

Additionaly this commit adjusts the call to target_link_libraries() accordingly to use the result of FIND_LIBRARY().

ajarno-cnrs avatar May 09 '23 08:05 ajarno-cnrs

Two questions:

  1. how did this ever work
  2. does this also affect the other examples?

I wonder how we should also inform upstream (https://github.com/farhanferoz/MultiNest) about this, but I am not sure how well-maintained it still is and how much this branch and theirs has diverged by now.

JohannesBuchner avatar May 09 '23 09:05 JohannesBuchner