jrl: Add cppad, cppadcg, gmp and mpfr find-modules - #868
Conversation
|
Tick the box to add this pull request to the merge queue (same as
|
076c2b2 to
10175bf
Compare
|
@nim65s I need to invoke your nix magic powers on this one :-) |
nim65s
left a comment
There was a problem hiding this comment.
I wonder if we should try pkg_check_modules(… IMPORTED_TARGET) (or In CMake >= 3.31, cmake_pkg_config(IMPORT …)) instead.
Some packages do not export cmake configs, but the .pc file they ship are good.
But probably we should continue using something similar to v1 find-external for now
|
I think the objective of the v2 was to drop |
|
probably not gmp or mpfr |
if gmp and mpfr not possible, I need to add an aditionnal option OFF by default to avoid building this test. Let me know. |
|
I mean I don't think gmp and mpfr will ever switch to CMake |
10fee4a to
8f2e02c
Compare
f53b99f to
7bdb1f5
Compare
7bdb1f5 to
ebee581
Compare
8bcc798 to
c5cda53
Compare
80090c9 to
a659a12
Compare
a659a12 to
72da341
Compare
72da341 to
0910d3d
Compare
Taken from stack-of-tasks/pinocchio#2923
Important note:
Initially the
Findcppadcg.cmakewas callingfind_package(cppad REQUIRED)internally.The issue is that our
jrl_export_package()cannot detect transitive find-modules, it only reacts tojrl_find_package().As we want to keep the find modules jrl-free, they have been edited to be autonomous:
Findcppadcg.cmakewill look for thecppad::cppadtarget internally, making it NOT depend onFindcppad.cmake.An alternative explored was on the user side, with people having to call the required finder before the other:
So that the
cppadfind module would get exported. This is not ideal as its difficult to enforce.