Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[export files] *_PACKAGE_LIST, *_LIBRARIES too long #32

Open
nschloe opened this issue Oct 6, 2014 · 6 comments
Open

[export files] *_PACKAGE_LIST, *_LIBRARIES too long #32

nschloe opened this issue Oct 6, 2014 · 6 comments

Comments

@nschloe
Copy link
Contributor

nschloe commented Oct 6, 2014

The export files are way to verbose on the *_LIBRARIES and *_PACKAGE_LIST. In Trilinos's NOX, for example we find

SET(NOX_LIBRARIES "trilinos_locathyra;trilinos_locaepetra;trilinos_localapack;trilinos_loca;trilinos_noxepetra;trilinos_noxlapack;trilinos_nox;trilinos_teko;trilinos_stratimikos;trilinos_stratimikosbelos;trilinos_stratimikosaztecoo;trilinos_stratimikosamesos;trilinos_stratimikosml;trilinos_stratimikosifpack;trilinos_ifpack2-adapters;trilinos_ifpack2;trilinos_zoltan2;trilinos_anasazitpetra;trilinos_ModeLaplace;trilinos_anasaziepetra;trilinos_anasazi;trilinos_belostpetra;trilinos_belosepetra;trilinos_belos;trilinos_ml;trilinos_ifpack;trilinos_amesos;trilinos_amesos2;trilinos_galeri-xpetra;trilinos_galeri;trilinos_aztecoo;trilinos_isorropia;trilinos_thyratpetra;trilinos_thyraepetraext;trilinos_thyraepetra;trilinos_thyracore;trilinos_xpetra-sup;trilinos_xpetra-ext;trilinos_xpetra;trilinos_epetraext;trilinos_tpetrarti;trilinos_tpetraext;trilinos_tpetrainout;trilinos_tpetra;trilinos_triutils;trilinos_zoltan;trilinos_epetra;trilinos_kokkosdisttsqr;trilinos_kokkosnodetsqr;trilinos_kokkoslinalg;trilinos_kokkosnodeapi;trilinos_kokkos;trilinos_rtop;trilinos_tpi;trilinos_teuchosremainder;trilinos_teuchosnumerics;trilinos_teuchoscomm;trilinos_teuchosparameterlist;trilinos_teuchoscore")

and

SET(NOX_PACKAGE_LIST "NOX;Teko;Stratimikos;Ifpack2;Zoltan2;Anasazi;Belos;BelosTpetra;BelosEpetra;BelosCore;ML;Ifpack;Amesos;Amesos2;Galeri;AztecOO;Isorropia;Thyra;ThyraTpetraAdapters;ThyraEpetraExtAdapters;ThyraEpetraAdapters;ThyraCore;Xpetra;EpetraExt;Tpetra;Triutils;Zoltan;Epetra;KokkosClassic;RTOp;ThreadPool;Teuchos;TeuchosRemainder;TeuchosNumerics;TeuchosComm;TeuchosParameterList;TeuchosCore")

These are literally all dependent libraries and packages, respectively.

The linking information, however, is handled much more elegantly by CMake itself, through the target export files.

We need to prune the exported libraries and packages list.

@bartlettroscoe
Copy link
Member

Nico,

My worry is that this will break some client projects that use these variables. I don't so I can't say but that is my guess.

Is there a problem other than these are large set() statements? I mean, is this a performance problem?

@nschloe
Copy link
Contributor Author

nschloe commented Oct 6, 2014

Whoever is using those is doing it wrong. All applications should only link against the libraries they are actually using; the rest is handled by CMake.
Anyhow, at the end of the day, no application should take notice of any of these changes. My guess is that applications use, e.g.,NOX_LIBRARIES in their TARGET_LINK_LIBRARIES() calls. They should continue to do so, just that the number of libraries they explicitly link against can potentially be much, much smaller. This will certainly bring down link times for shared libraries, though I'm not sure by how much.

@nschloe
Copy link
Contributor Author

nschloe commented Oct 6, 2014

As for *_PACKAGE_LIST, I have no idea of what use this list may be to any application.

@bartlettroscoe
Copy link
Member

@nschloe, now that I am starting to work with these <Package>Config.cmake files as part of a little work on #63 on the branch

I definitely see what you are talking about. It looks like a <Package>Config.cmake file should only list the libraries for its direct lib dependencies. The indirect dependencies would be taken care of automatically with the import library targets, etc.

These <Package>Config.cmake files are going to be the key to allowing TriBITS to scale to a huge amount of software. Therefore, I am going to be examining these files and their dependent files in the weeks and months to come.

@nschloe
Copy link
Contributor Author

nschloe commented Sep 23, 2017

Note that PR #60 tries to fix this. It's two and a half years old now, so it might need a little update.

@bartlettroscoe
Copy link
Member

Note that PR #60 tries to fix this. It's two and a half years old now, so it might need a little update.

As part of the work I am doing right now I will need to add some stronger tests for the generated <Package>Config.cmake files. After those tests are in place, then I can take a look at PR #60 and then I can test it out to know that it will not break anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants