Request to have Caliper include its Adiak location in target
Closed this issue · 1 comments
aaroncblack commented
I'm currently building a code that uses Caliper, and my Caliper was built with Adiak enabled.
I would like the ability to do these two use cases:
- provide an adiak target for caliper
OR - not provide an adiak target, and have caliper use the one it was built and installed against.
(I have some user requests for both of the above)
I think I've found an example from UMPIRE that does this that could be modelled off of (tagging @davidbeckingsale in case he has suggestions):
47 if (NOT TARGET camp)
48 set(UMPIRE_CAMP_DIR "/foo/bar/camp-2022.10.1-vtkaejk5syv36ypagru2gf7ekydttcsu/lib/cmake/camp")
49 if(NOT camp_DIR)
50 set(camp_DIR ${UMPIRE_CAMP_DIR})
51 endif()
52
53 find_dependency(camp CONFIG NO_DEFAULT_PATH PATHS
54 ${camp_DIR}
55 ${camp_DIR}/lib/cmake/camp
56 ${PACKAGE_PREFIX_DIR}
57 ${PACKAGE_PREFIX_DIR}/lib/cmake/camp)
58 endif ()
If I set up a camp target in my code, then umpire will use it. If I don't set up a camp target myself, then umpire defaults to the one it was built with.