-
Notifications
You must be signed in to change notification settings - Fork 86
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
Update path for HIP in GinkgoConfig.cmake.in #680
Conversation
GinkgoConfig.cmake will be created in build directory, not in ginkgo cmake, therefore need to add "/../cmake/" as path
Hi! Thanks for this PR, you are correct we have an issue with this from the perspective of the build directory. One thing to consider though, is that the current setup works when installing Ginkgo (as the helpers are copied to the same directory as the GinkgoConfig.cmake), and your version would make us lose this ability. We should probably fix this in another way, some ways to fix it that I can think of are:
For now, I am more leaning towards option 2. What do you think? Also @ginkgo-project/developers. |
option 2 also sounds better to me. |
If we are reasonably sure that these are the only two files that will need this kind of change when Ginkgo is used without installation, then option 2 sounds good. Otherwise, we might want to look at option 1 for a general solution in which we can fine-tune everything for a kind of in-source use case. The package registry option that @tcojean mentioned is also an interesting idea for a more general solution, but I feel it's not the most suitable for this PR's use case. It seems like the idea is to have a Ginkgo build specifically for one dependent project, rather than user-wide or system-wide. |
Option 1 sounds more brittle to me, since it sounds to me like we would need to assume that a build directory is used either to install Ginkgo, or to include from directly, but not both (since variables are more or less fixed, only generator expressions can depend on the output). @cho-uc Just so we understand what you are looking for, can you tell us what your current mode of use is? Right now, we support and test for Ginkgo installed with |
Since I don't have admin privilege in the server where I installed ginkgo, I can only built locally, run "make" but not "install". |
Thanks for the details, I see the issue now. Another solution to this issue would be to install Ginkgo in a custom user-local In our root |
Ach I see, I didn't set CMAKE_INSTALL_PREFIX so it used the default value in /usr/local/ in which I don't have access to. |
Good that you found your solution. I think this file should still be revised. As we discussed, there is indeed an issue with this file, but maybe it's better to tackle this in a separate PR since we need to use another way, and probably add a test as well. |
Also test linking through the build directory. This fixes the problem with `GinkgoConfig.cmake` from a build directory perspective, while keeping a correct installation setup. To ensure this works, I also test linking Ginkgo after exporting the build directory so that CMake is able to use this when doing a `find_package()`. We already had an option for this, it's only a matter of actually using it. Issue found by: #680 Related PR: #685
GinkgoConfig.cmake will be created in build directory, not in ginkgo cmake, therefore need to add "/../cmake/" as path