You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
prefix cmake flags that enable optional features with PUMI #337
So, what if a consumer wants to use PUMI compiled with egads but they have conditional code behind HAVE_EGADS that they don't want to compile for some reason...currently they cannot do that since compile definitions are infectious. I think @cwsmith has last word on this sort of thing since he has to deal with all the xsdk people/rules.
The issue with the non-target version of add_definitions (especially in the top level cmake file) is that it will be applied to every single target and library at the current or lower sub-directory level. So, even random libraries that have nothing to do with egads are getting that compile definition added. Since these compile definitions will be infectious to anyone who uses any SCOREC target it has the potential to cause issues for down stream users.
My preference in these cases is to add a programmatic interface to check for library support (like apf::hasMETIS(), apf::hasCAP()). These calls can be scoped and do not require compile definitions via CMake or SCOREC_config.h. These checks do not allow for different types, but polymorphic interfaces like apf::Mesh*/apf::Splitter can reduce the necessity for compile-time type differences.
Activity
bobpaw commentedon Jun 3, 2025
Related to #477.
bobpaw commentedon Jul 4, 2025
#330 (comment)
My preference in these cases is to add a programmatic interface to check for library support (like
apf::hasMETIS(),apf::hasCAP()). These calls can be scoped and do not require compile definitions via CMake orSCOREC_config.h. These checks do not allow for different types, but polymorphic interfaces likeapf::Mesh*/apf::Splittercan reduce the necessity for compile-time type differences.jacobmerson commentedon Jul 9, 2025
This is one reason why we try to have all the macros prefixed with the project name.
cmake: rename PUMI_ENABLE_SIMMETRIX
cmake: rename PUMI_ENABLE_SIMMETRIX
cmake: rename PUMI_ENABLE_SIMMETRIX
cmake: rename PUMI_ENABLE_SIMMETRIX