Skip to content

Address some issues for initial implementation for treating internal packages as external (#63) #562

@bartlettroscoe

Description

@bartlettroscoe

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 IMPLEMENT

    • or

    • 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) #576

  • Address 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 that find_package(KokkosKernels) will call find_dependency(Kokkos<Subpkg>) which will result in setting Kokkos_ROOT which will allow find_package(Kokkos) to find KokkosConfig.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() before tribits_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 a FindTPL<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 value TRIBITS_PKG:<path-to-dir-or-file>.

  • Add selected unit tests for tribits_extpkgwit_XXX() functions in TribitsExternalPackageWriteConfigFile_UnitTests.cmake.

  • Update existing TribitsExampleProject_External and TribitsExampleProject2_External tests to directly include() 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 the Dependencies.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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Selected

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions