Skip to content

Commit

Permalink
Document the need for <Package>_FULL_ENABLED_DEP_PACKAGES (TriBITSPub…
Browse files Browse the repository at this point in the history
…#299, TriBITSPub#63)

Unfortunately, I could not remove the computation of the full set of direct
and indirect dependencies for each pacakge <Package>_FULL_ENABLED_DEP_PACKAGES
because the function tribits_find_most_recent_file_timestamp() still needs
this.  The only customer that still needs that function is CASL VERA (to
compute when it is needed to rebuild MOOSE).

Therefore, for now, I can't remove this code (which is more complex and can be
an expensive computation if there are a **lot** of packages).
  • Loading branch information
bartlettroscoe committed Oct 17, 2022
1 parent 515df6c commit f8615fe
Showing 1 changed file with 22 additions and 15 deletions.
37 changes: 22 additions & 15 deletions tribits/core/package_arch/TribitsAdjustPackageEnables.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1588,13 +1588,9 @@ macro(tribits_adjust_package_enables)
endmacro()


# Function that sets up the full package dependencies for each enabled package
# including all of its indirect upstream package dependencies.
#
# This is needed in several different parts of the TriBITS implementation.
#
# ToDo: #63: Remove this function since we should not need a full list of
# direct and indirect package dependencies!
# Function that sets up the full package dependencies for the given internal
# enabled package ``${PACKAGE_NAME}``, including all of its indirect upstream
# internal package dependencies.
#
function(tribits_package_set_full_enabled_dep_packages PACKAGE_NAME)

Expand Down Expand Up @@ -1657,23 +1653,30 @@ function(tribits_package_set_full_enabled_dep_packages PACKAGE_NAME)
global_set(${PACKAGE_NAME}_FULL_ENABLED_DEP_PACKAGES
${ORDERED_PACKAGE_FULL_DEPS_LIST})

if (${PROJECT_NAME}_VERBOSE_CONFIGURE)
print_var(${PACKAGE_NAME}_FULL_ENABLED_DEP_PACKAGES)
endif()

endfunction()


# Function that creates enable-only dependency data-structures
#
# ToDo: #63: Remove this function since we should not need a full list of
# direct and indirect package dependencies!
# For each enabled package `<Package>`, this function sets up the global list
# var::
#
# <Package>_FULL_ENABLED_DEP_PACKAGES
#
# If ``${PROJECT_NAME}_GENERATE_EXPORT_FILES_FOR_ONLY_LISTED_PACKAGES`` is
# set, then ``<Package>_FULL_ENABLED_DEP_PACKAGES`` will only be sets for
# those packages. Otherwise, ``<Package>_FULL_ENABLED_DEP_PACKAGES`` will be
# set for all packages listed in `${PROJECT_NAME}_ENABLED_INTERNAL_PACKAGES`_.
#
# NOTE: The modern TriBITS implementation does not need this full list of
# dependencies for each package. Only the function
# `tribits_find_most_recent_file_timestamp()` needs this. (Therefore, this
# could not be striped out of TriBITS because there are still some projects
# that use this function.)
#
function(tribits_set_up_enabled_only_dependencies)

set(GENERATE_EXPORT_DEPENDENCIES ${${PROJECT_NAME}_GENERATE_EXPORT_FILE_DEPENDENCIES})
set(lastExportTribitsPackage)

if ("${${PROJECT_NAME}_GENERATE_EXPORT_FILES_FOR_ONLY_LISTED_PACKAGES}" STREQUAL ""
AND NOT
"${${PROJECT_NAME}_GENERATE_EXPORT_FILES_FOR_ONLY_LISTED_SE_PACKAGES}" STREQUAL ""
Expand All @@ -1689,6 +1692,9 @@ function(tribits_set_up_enabled_only_dependencies)
${${PROJECT_NAME}_GENERATE_EXPORT_FILES_FOR_ONLY_LISTED_SE_PACKAGES} )
endif()

# Determine lastExportTribitsPackage if not to generate any of these full
# dependency lists
set(lastExportTribitsPackage "")
if (GENERATE_EXPORT_DEPENDENCIES
AND ${PROJECT_NAME}_GENERATE_EXPORT_FILES_FOR_ONLY_LISTED_PACKAGES
)
Expand Down Expand Up @@ -1720,6 +1726,7 @@ function(tribits_set_up_enabled_only_dependencies)

endif()


if (GENERATE_EXPORT_DEPENDENCIES)

if (lastExportTribitsPackage)
Expand Down

0 comments on commit f8615fe

Please sign in to comment.