LLNL / Caliper

Caliper is an instrumentation and performance profiling library
http://software.llnl.gov/Caliper/
BSD 3-Clause "New" or "Revised" License
342 stars 63 forks source link

cmake-time logic to detect deps needed due to service enabled? #577

Open cyrush opened 1 month ago

cyrush commented 1 month ago

In downstream libs (conduit + ascent) we are resolving caliper deps with our cmake logic.

For example, we assume that adiak is being used and require folks tell us where adiak is.

But we don't need adiak in all cases.

We would like to only require it when the caliper build we are using requires it.

As far as I can tell, these services don't expose any headers, or other info that can be trivially searched to determine which dependencies are required for a given caliper build. May there is a config header we should look at that I missed?

Are there cmake config vars that can tell us what is enabled that can help us know what we need to resolve?

Longer term: Would you be open to installed cmake logic that automatically finds the right dependencies + cmake targets? We have some exemplars that can serve as a working solution to follow.

cyrush commented 1 month ago

Looks like I can parse cali-config.h and pick out which defines are valid. Not fun with cmake string logic, but doable.

daboehme commented 1 month ago

Hi @cyrush, I'm certainly open to adding that CMake logic. Would be great if you can point me at the examples you have.

cyrush commented 1 month ago

@daboehme awesome, I can help -- might be a few weeks in the future.