-
Notifications
You must be signed in to change notification settings - Fork 46
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
Address some issues for initial implementation for treating internal packages as external (#63) #562
Comments
CC: @ibaned, @crtrott, @jwillenbring, @rppawlo @dalg24 and @masterleinad, following up from our meeting on Wednesday, I think there is a way to address special TPLs upstream from Kokkos like CUDA where you don't want to have to provide upstream
The idea is that when TriBITS calls which is just two lines:
So if I think that solves the problem you expressed (with the disadvantage that a different TPL could be found by Trilinos that what is found by Kokkos). The constraint is that if a TriBITS-compliant external package does provide the Does that make sense? So we would be back in the situation that it may be possible for the configuration of Trilinos to find different TPLs that what Kokkos found when it was configured. That is not great but those are the breaks for packages that are not fully TriBITS compliant. (Fully TriBITS-compliant external packages that provide This makes TriBITS more complex but it is what it is. |
I noticed these while reading over documentation while adding a comment to #562.
CC: @ibaned, @crtrott, @jwillenbring, @rppawlo @dalg24 and @masterleinad, The other option is to treat Kokkos as an non-TriBITS-compliant external package with imported targets as described in: This would allow the creation of a Support for this type package that that is listed both as a TriBITS external package/TPL (in the |
@bartlettroscoe For the first option, in the case where everything was being built within Spack, wouldn't it be the case that the Spack dependencies could be used to help make sure we are using consistent versions of TPLs? This obviously does not fully solve the problem, but it would mitigate the impact of the possibility of finding different versions of TPLs if that was not possible for the case where we are building with Spack. |
CC: @ibaned, @crtrott, @jwillenbring, @rppawlo, @dalg24, @masterleinad
@jwillenbring, for dependencies upstream from Kokkos that are found with And note the fundamental problem with finding different external dependencies with multiple calls to
This problem has no answer with raw CMake other than to tell users to make sure that does not happen (and modify the calls to This new TriBITS implementation and the way it handles external dependencies should fully resolve that problem by making sure that an external dependency is ever only found once, no matter how many individual CMake projects are stringed together and may have the same dependency with no need to add anything to the environment in downstream CMake projects. And by providing these more robust |
Parent Issue:
Description
While the basic implementation for treating internally defined packages as external package in PR #560 is is complete (part of #63), it could use some more checking and smooth out some use cases. The following should be done following the merge of #560 when we have some time:
Address TriBITS-compliant external packages missing TriBITS-compliant upstream dependencies:
Add check that
<tplName>::all_libs
are defined for all enabled TPLs at the end of the processing of TPLs (and add a test case that violates this) ... DID NOT IMPLEMENTor
Consider making it so that if a TriBITS-compliant external packages do not provide the
<UpstreamPkg>::all_libs
target for all of its upstream external packages/TPLs then the external package/TPL must be found again by TriBITS in the 2nd loop (and put in checks that external packages/TPLs upstream from these also don't have the<UpstreamPkg>::all_libs
target defined either) ... Implemented in PR Support non-fully TriBITS-compliant external packages (#63) #576Address needing to find again subpackage or the parent package already found by TriBITS-compliant external packages being pulled in by either:
Setting
<ParentPackage>_ROOT
in subpackage<Package>Config.cmake
files and then looping over TriBITS-compliant external packages (and those upstream from them) in reverse order (i.e. so thatfind_package(KokkosKernels)
will callfind_dependency(Kokkos<Subpkg>)
which will result in settingKokkos_ROOT
which will allowfind_package(Kokkos)
to findKokkosConfig.cmake
). ... Looping in reverse order was implemented in PR #576 but not setting<ParentPackage>_ROOT
.or
Looping over subpackages for TriBITS-compliant external packages and not trivially enabled parent TriBITS-compliant external packages (i.e. call
tribits_adjust_internal_external_packages()
beforetribits_do_final_parent_packages_enables_for_subpackage_enables()
and set var<Package>_IS_TRIVIALLY_ENABLED_PARENT_PACKAGE=TRUE
for parent packageS that are only enabled at the end because one or more of their subpackages were enabled) (don't call find_package() on trivially enabled parent TriBITS-compliant external packages). ... This will NOT be implemented!Add check that each TriBITS-compliant external package has the same upstream enables and disables as determined in the downstream TriBITS project (and add a test case that violates this). (This can only be done for fully TriBITS-compliant external packages.)
Add tests for setting
<Project>_ENABLE_<tplName>=ON
and<Package>_ENABLE_<tplName>=ON
and make sure that the TPL is enabled correctly and processed in each case since<Project>_ENABLE_<tplName>=ON
now triggers the enable of a TriBITS external package/TPL (i.e. defined with aFindTPL<tplName>.cmake
file).Add support and tests for
FindTPL<tplName>Dependencies.cmake
files for TriBITS-compliant external packages listed in the TPLsList.cmake file with the special valueTRIBITS_PKG:<path-to-dir-or-file>
.Add selected unit tests for
tribits_extpkgwit_XXX()
functions inTribitsExternalPackageWriteConfigFile_UnitTests.cmake
.Update existing
TribitsExampleProject_External
andTribitsExampleProject2_External
tests to directlyinclude()
every TriBITS-generated<tplName>Config.cmake
file in a different dummy CMake project to ensure they can stand alone.Extend package-by-package mode with
tribits_ctest_driver()
to build and install packages one at a time and configure the next package (consider copying the TriBITS project source dir and deleting all of the files and dirs under<packageDir>/
except theDependencies.cmake
file after the package is installed).Set up test for
TribitsExampleProject
using package-by-package mode with intermediate install of each package in order.Set up test for
TribitsExampleProject2
using package-by-package mode with intermediate install of each package in order.The text was updated successfully, but these errors were encountered: