-
Notifications
You must be signed in to change notification settings - Fork 47
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
Change to use find_package(CUDAToolkit) and some other changes (trilinos/Trilinos#10954) #528
Merged
bartlettroscoe
merged 3 commits into
TriBITSPub:master
from
bartlettroscoe:tril-10954-cudatoolkit
Oct 3, 2022
Merged
Change to use find_package(CUDAToolkit) and some other changes (trilinos/Trilinos#10954) #528
bartlettroscoe
merged 3 commits into
TriBITSPub:master
from
bartlettroscoe:tril-10954-cudatoolkit
Oct 3, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When find_package(<externalPkg>) uses a find module Find<exteranlPkg>.cmake instead of a package config file <externalPkg>Config.cmake, the variable. <externalPkg>_DIR is not set. Therefore, it is best to not set <externalPkg>_DIR in the TriBITS-geneated <tplName>Config.cmake file since that is just confusing. NOTE: The case where TriBITS a FindTPL<tplName>.cmake module calls find_package(<externalPkg>) is the only a situation where this is the case. When one TriBITS TPL is calling find_dependency() on an upstream TriBITS TPL, the <upstreamDepTpl>_DIR variable is always set.
This allows configuring with: -D "CTEST_BUILD_FLAGS=-j<n> -k 9999999" and having these arguments work correctly.
This is needed in order to avoid namespace classes with downstream CMake projects that call find_package(CUDAToolkit) (e.g. like Nalu-Wind, see trilinos/Trilinos#10954). NOTE: This has matching changes in the downstream Trilinos TPL files FindTPLCUBLAS.cmake and FindTPLCUSPARSE.cmake. You can't use this updated TriBITS version with Trilinos without those matching Trilinos FindTPL<tplName>.cmake changes (see trilinos/Trilinos#10954).
eb3aa3b
to
23dc20b
Compare
rabartlett1972
approved these changes
Oct 3, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am going to allow this to merge so I can snapshot to Trilinos and get trilinos/Trilinos#10954 fixed. I will then set up for a post-merge review.
Hello @KyleFromKitware, can you please perform a post-merge review of this PR? Please review the commits individually. |
+1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The main purpose of this PR is to change
FindTPLCUDA.cmake
to usefind_package(CUDAToolkit)
instead offind_package(CUDA)
(see trilinos/Trilinos#10954 and especially trilinos/Trilinos#10954 (comment)).This PR also contains some come commit to address some other issues I noticed while working on this PR (related to #299).
Instructions for Reviewers
Please review each commit independently.