GEOS-ESM / ESMA_cmake

Custom CMake macros for the GEOS Earth System Model
Apache License 2.0
4 stars 9 forks source link

conditional `find_package()` #183

Open tclune opened 3 years ago

tclune commented 3 years ago

We now have a few instances where a package is only "mostly" required. E.g., pflogger now has a stub option.

A cmake macro tha wraps find_package() could perhaps make the logic more clear. It would take the same options as find_package() but with an additional argument that controls whether to invoke find_package()

esma_find_package(PFLOGGER REQUIRED IF ${BUILD_WITH_PFLOGGER})

Not 100% certain that this is worthwhile though. Comments appreciated. @weiyuan-jiang @rmontuoro @mathomp4