#868894 find_package option COMPONENTS ineffective because of hard-coded includes in TrilinosConfig.cmake

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:
#868894#5
Date:
2017-07-19 14:34:07 UTC
From:
To:
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.

#868894#10
Date:
2017-07-23 15:53:47 UTC
From:
To:
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

#868894#15
Date:
2017-07-23 15:53:47 UTC
From:
To:
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

#868894#20
Date:
2017-08-29 07:39:10 UTC
From:
To:
finally I reported it upstream at https://github.com/trilinos/Trilinos/issues/1655
- Joachim