#868894 find_package option COMPONENTS ineffective because of hard-coded includes in TrilinosConfig.cmake #868894
- Package:
- trilinos-dev
- Source:
- trilinos
- Description:
- object-oriented framework for large-scale problems - development files
- Submitter:
- Joachim Wuttke
- Date:
- 2021-04-29 17:21:22 UTC
- Severity:
- normal
- Tags:
CMake's find_package takes an option COMPONENTS. Usage with Trilinos seems to be documented nowhere, but TrilinosConfig.cmake clearly is intended to support e.g. find_package(Trilinos REQUIRED COMPONENTS Epetra Belos Ifpack) However, at the bottom of TrilinosConfig.cmake there is a long list that includes all Trilinos subproject CMake files. This overwrites the component selection, and makes it ineffective: the client application will depend on _all_ of Trilinois, not just on the selected components.
Thanks, Joachim, for the report! This definitely sounds like an upstream bug. Would you mind reporting it on [1]? Together with the Trilinos devs, we'll be able to take it from there. That being said, at first glance the inclusion of the subpackage configs doesn't seem to override anything. I'd be interested to improve the cmake export config though. Cheers, Nico [1] https://github.com/trilinos/trilinos/issues
Thanks, Joachim, for the report! This definitely sounds like an upstream bug. Would you mind reporting it on [1]? Together with the Trilinos devs, we'll be able to take it from there. That being said, at first glance the inclusion of the subpackage configs doesn't seem to override anything. I'd be interested to improve the cmake export config though. Cheers, Nico [1] https://github.com/trilinos/trilinos/issues
finally I reported it upstream at https://github.com/trilinos/Trilinos/issues/1655 - Joachim