-
Notifications
You must be signed in to change notification settings - Fork 572
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
tribits/cmake scripts: avoid generating <x>Config.cmake with the same name as upstream #11284
Comments
@Neumann-A Maybe post at https://github.com/TriBITSPub/TriBITS/issues? |
@Neumann-A, there are larger considerations here. See the last paragraph in: and see: What specific problem are you having? How can it be reproduced? Let's focus first on the real problem before jumping to an assumed solution. |
Hmm ok. I thought this was the relevant toplevel project. I am using an installed tree (as port within vcpkg). So the issue happend when I was pulling in external VTK (with external So sry to tell you, from what I have seen up until now, tribits seems to be trash for handling external dependencies.
It is probably enough to have
And have both
will still try to generate the additional imported target Also seems like I cannot use this project at all since it has two |
CC: @gsjaardema
Okay, I see the problem at: and We had the exact same situation with some The solution is to change: to call
Can you give that a try?
A TriBITS project is only as good at finding/resolving external dependencies as the |
From what I see that is not a requirement. I can just use Still wondering why Zlib is not doing that..... Considering it has been in CMake since version 3.1. The aux.* files however are a blocker. Could those please be renamed. But thanks I see a simple way now to fix my linking and library search issues with trilinios. |
Ok the trick is probably to not use a official release and go some later commit |
@Neumann-A, what are |
Seems to have been renamed in a more recent commit. aux is a reserved identifier on windows. |
Partially because using modern IMPORTED targets with external packages/TPLs with TriBITS projects was only possible in Trilinos with the merge of: There is a lot of catching up to do. (The good news is that most TPLs require just two statements.) |
@Neumann-A, trilinos does not have any maintained automated builds for Windows so it is difficult for the project to consistently support Windows (even though the basic CMake build system for Trilinos works fine on Windows has has since the beginning of CMake usage in Trilinos dating back to 2008). Thanks for making us aware of these issues! |
FYI: The driver for this seems to be: It seems that Microsoft is maintaining a Trilinos package for deployment on Windows and other systems? Did anyone in Trilinos know about this? |
I am not Microsoft just a contributor to vcpkg. The only reason I created a trilinos port is to de-vendor seacas from the VTK port. |
I was just commenting on the existence of Trilinos in https://github.com/microsoft/vcpkg (which is under the "microsoft" GitHub organization so one would assume this has something to do with Microsoft). |
@Neumann-A, FYI: after some more thought on this issue, I created the TriBITS issue: and just merged the PR: to TriBITS 'master'. I will next update the TriBITS snapshot into Trilinos 'develop' and then the TriBITS changes in microsoft/vcpkg#27928 should no longer be needed. And then this GitHub issue should be resolved. I just want to make clear that there is no need to rename the TriBITS-generated files |
FYI: The Trilinos PR: should contain the fix for this. |
I find it extremely fishy to have, e.g. two A second collision i see: if there are two tribits project individually build with the same external dependency (but differently resolved) installed into the same install prefix. In this case the generated and installed |
@Neumann-A, that is not entirely true. Even if
I can see how that might happen. But if you are creating any combined (static) executables, then that will not give a valid build anyway. For example, you can't be linking a single executable combining libraries that point to two different implementations of BLAS. In that case, you would like to perhaps detect that such a mistake has happened and error out. (And that is something that we can likely catch by putting in checks if we are worried about that.) But one might resolve a case like this in general by putting in relative include paths to the TriBITS-generated
But note that a TriBITS generated All of this may need some more tweaking as we work out all of these use cases. Most of the issues described in this GitHub issue are implementation details that can and not break backward compatibility. Therefore, there is opportunity to perform these tweaks as we learn more. What we are building with updated TriBITS in a general purpose way to glue together CMake packages in various states of modern CMake compliance and giving us the flexibility to build CMake-based packages in different aggregate CMake projects as best suits our current needs. That is the best case scenario for development and deployment processes and systems. (And we can do this with just some CMake macros and not requiring a heavy weight package management system.) |
@Neumann-A, actually, the TriBITS generated and Again, much of this can be tweaked without breaking backward compatibility as we learn more. |
FYI: PR #11380 was just merged so the core problem raised in this issue should be addressed. @Neumann-A, using this version of Trilinos 'develop' should avoid the heavy modifications to TriBITS in the microsoft/vcpkg#27928 (comment). I will put this issue in review. |
FYI: PR #11458 that brings back this fixed was just merged. (I had to back it out over the holiday break due to a few issues.) |
This issue has had no activity for 365 days and is marked for closure. It will be closed after an additional 30 days of inactivity. |
This issue was closed due to inactivity for 395 days. |
Enhancement
@trilinos/tribits ? (cmake helper scripts as far as I can tell)
First, please refactor the generation of
<x>Config.cmake
to generateTPL<x>Config.cmake
instead (or some other prefix) to avoid collisions with<x>Config.cmake
own version. Second, please refactor the usage of external targets to be alsoTPL::
prefixed to avoid collisions with other external targets. E.g.fmt::fmt
from tribits collides withfmt::fmt
from fmt itself and CMake rightfully complains about the fact that it find two configs with different targets.The text was updated successfully, but these errors were encountered: