[Trilinos-Users] tribits: libs and subpackages ?

Bartlett, Roscoe A. bartlettra at ornl.gov
Thu Sep 17 10:42:55 EDT 2015


Note that the “Core” subpackages usually come first before all of the other subpackages in a parent package.  However, any libraries in the parent package come *last* after the libraries in the subpackages as explained here:

    https://tribits.org/doc/TribitsDevelopersGuide.html#tribits-subpackages
    https://tribits.org/doc/TribitsDevelopersGuide.html#tribits-se-packages

which says:

“The parent package is always implicitly dependent on its subpackages (e.g. parent package WithSubpackages depends on its subpackages WithSubpackagesA, WithSubpackagesB, and WithSubpackagesC).”

and:

“For example, the SE Packages provided by the top-level example package WithSubpackages (in order of increasing dependencies) are WithSubpackagesA, WithSubpackagesB, WithSubpackagesC, and WithSubpackages (see TribitsExampleProject).”

A lot of people get confused by this ordering for some reason.  Hopefully this will clear this up before you go down the wrong path.

Cheers,

-Ross


From: Trilinos-Users [mailto:trilinos-users-bounces at trilinos.org] On Behalf Of Daniel Ibanez
Sent: Thursday, September 17, 2015 10:35 AM
To: Bartlett, Roscoe A.
Cc: trilinos-users at trilinos.org
Subject: Re: [Trilinos-Users] tribits: libs and subpackages ?

Okay, I looked for such configurations in Trilinos but
the closest I found were packages with a "Core" sub-package,
which I guess is the design you're suggesting.
We'll try to organize things that way, thanks.

On Thu, Sep 17, 2015 at 10:30 AM, Bartlett, Roscoe A. <bartlettra at ornl.gov<mailto:bartlettra at ornl.gov>> wrote:
Daniel,

It is allowed for a parent package to have its own libs, executables, tests, etc. as well as subpackages.  There are several examples of TriBITS packages like this in Trilinos and other projects (just search for Dependencies.cmake files that have non-empty lists of libs and subpackages).

But I would not recommend doing this because the enable/disable of the parent package is the same as the enable/disable of all the subpackages:

    https://tribits.org/doc/TribitsDevelopersGuide.html#enable-disable-of-parent-package-is-enable-disable-for-subpackages

I would recommend that you create a new subpackage to put these libs/executables/tests into and then then you can turn that subpackages on and off independent of the other subpackages.

Cheers,

-Ross


From: Trilinos-Users [mailto:trilinos-users-bounces at trilinos.org<mailto:trilinos-users-bounces at trilinos.org>] On Behalf Of Daniel Ibanez
Sent: Thursday, September 17, 2015 10:23 AM
To: trilinos-users at trilinos.org<mailto:trilinos-users at trilinos.org>
Subject: [Trilinos-Users] tribits: libs and subpackages ?

Hello,

I have a package which declares a library, headers, and so on.
Then I tried to add a sub-package to it, which made the
library and headers "disappear" (omitted from packageConfig.cmake).
Is it a known rule that a package must have either
source code or sub-package but not both ?

Thank you,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://trilinos.org/pipermail/trilinos-users/attachments/20150917/22a7e3c1/attachment.html>


More information about the Trilinos-Users mailing list