-
Notifications
You must be signed in to change notification settings - Fork 12
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
Please do not install irrelevant cmake modules #163
Comments
I think they are? libsedml depends on libsbml, its tests are run with check, and the rest are libsbml's dependencies. |
When you install such modules - random other packages might pick them up instead of what they are using and fail for this reason. |
As described in the numl post: NuML/NuML#26, changing to use find scripts was the only way to ensure that the export scripts dont absolute paths of the build machine. These find scripts are there, so that the imported targets would work, no matter what configuration of libSBML was used as a starting point. |
This is incorrect if a package has their own FindXXXX module that would be somewhere in their package and that location would have to be added to the CMAKE_MODULE_PATH. This module is preferred to the standard module. |
I would prefer to only install FindSEDML. LibSBML should install FindLIBSML and all necessary modules for its configuration, i.e., if it is linked against expat FindEXPAT. If it is campiled with zlib support FindZLIP, etc. |
I am strongly for providing those modules out off own interest so that we not have to maintain FindSBML multiple times. As a compromise we might consider to install those modules in PREFIX/share/combine/Modules. |
Ideally SBML should install its own cmake module so that all its dependent packages should reuse it. Dependencies shouldn't be duplicating |
I agree |
ok, then i will next week change all the libraries again, to do it that way. LibSBML, will install the find scripts it needs, together with the find script for libsbml. All other libraries, will adjust their CMAKE_MODULE_PATH to include the one installed by libSBML, and then just install their own find module into that directory. |
These should be installed into its own namespace, not globally, to prevent interaction with other packages. |
could you suggest a namespace to use then? |
It should be under its library name - LibSBML. |
I'm still not clear about this. Are you suggesting that instead of installing find scripts like So i'm against prefixing the dependent libraries with libSBML, as for example COPASI will need the expat target as well. So EXPAT::EXPAT is the better one to use there. |
I am not a cmake expert, but files that you install should only affect LibSBML and not third party software. expat, check and xerces-c3, for example. provide .pc files, so you can just use them. |
I think here are two different topics messed up:
Only the first choice which is the default for CMake modules may present a possible conflict if the module name is already existing. The other 2 are fully under our control. If we are not using 1) I would vote for 3) as all other libraries numl, combine, libsedml, etc can be installed in that place. I personally suggest 1) for libraries which we control like libsbml, libcombine, libnuml, and libsedml since we are the authority. These would make them accessible to all 3rd parties. For support libraries like libxml2, expat, raptor or zlib I suggest that libsbml installs them under:
For libraries we control we should use NAME::NAME where the associated CMake module is called FindNAME.cmake. For libraries which we do not control and for which no CMake modules are available. I suggest that we use the following as NAME: |
I think you are not understanding the problem. We still need a module appropriately named FindEXPAT.cmake, which will look for it. If that does not exist we have to write our own. We have done more than once our intention is to avoid copying the code. |
cmake supports pkg-config files through pkg_check_modules. So there's really no need for |
We are of course aware of it and we are using it in our modules as one alternative to find library information. However, |
2.0.30 installs:
that aren't used by the project.
The text was updated successfully, but these errors were encountered: