Skip to content

Commit

Permalink
Merge pull request #550 from TriBITSPub/63-combined-package-data-stru…
Browse files Browse the repository at this point in the history
…ctures-4-fixups
  • Loading branch information
bartlettroscoe authored Dec 12, 2022
2 parents d5d6d30 + dd6dd59 commit 9289e09
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 18 deletions.
14 changes: 7 additions & 7 deletions test/core/TestingFunctionMacro_UnitTests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -133,21 +133,21 @@ function(unittest_append_string_var)
endfunction()


function(unittest_tribit_create_reverse_list)
function(unittest_tribits_create_reverse_list)

message("\n***")
message("*** Testing tribit_create_reverse_list()")
message("*** Testing tribits_create_reverse_list()")
message("***\n")

message("tribit_create_reverse_list() with empty list")
message("tribits_create_reverse_list() with empty list")
set(someEmptyList "")
tribit_create_reverse_list(someEmptyList someEmptyList_reversed)
tribits_create_reverse_list(someEmptyList someEmptyList_reversed)
unittest_compare_const(someEmptyList_reversed "")


message("tribit_create_reverse_list() with non-empty list")
message("tribits_create_reverse_list() with non-empty list")
set(someList a b c d)
tribit_create_reverse_list(someList someList_reversed)
tribits_create_reverse_list(someList someList_reversed)
unittest_compare_const(someList_reversed "d;c;b;a")

endfunction()
Expand Down Expand Up @@ -4761,7 +4761,7 @@ message("*** Testing misc TriBITS functions and macros")
message("***\n")

unittest_append_string_var()
unittest_tribit_create_reverse_list()
unittest_tribits_create_reverse_list()
unittest_tribits_find_python_interp()
unittest_tribits_standardize_abs_paths()
unittest_tribits_dir_is_basedir()
Expand Down
4 changes: 2 additions & 2 deletions tribits/ci_support/TribitsWriteXmlDependenciesFiles.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -220,14 +220,14 @@ function(tribits_get_legacy_package_deps_sublist packageName libOrTest
set(matchesRequriedOrOptional TRUE)
endif()

SET(matchesPackagesOrTpls FALSE)
set(matchesPackagesOrTpls FALSE)
if (((packagesOrTpls STREQUAL "PACKAGES")
AND (${depPkg}_PACKAGE_BUILD_STATUS STREQUAL "INTERNAL"))
OR
((packagesOrTpls STREQUAL "TPLS")
AND (${depPkg}_PACKAGE_BUILD_STATUS STREQUAL "EXTERNAL"))
)
SET(matchesPackagesOrTpls TRUE)
set(matchesPackagesOrTpls TRUE)
endif()

if (matchesRequriedOrOptional AND matchesPackagesOrTpls)
Expand Down
9 changes: 4 additions & 5 deletions tribits/core/package_arch/TribitsAdjustPackageEnables.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ macro(tribits_sweep_forward_apply_enables)

tribits_get_sublist_nondisabled( ${PROJECT_NAME}_DEFINED_INTERNAL_PACKAGES
${PROJECT_NAME}_NOTDISABLED_INTERNAL_PACKAGES "")
tribit_create_reverse_list(${PROJECT_NAME}_NOTDISABLED_INTERNAL_PACKAGES
tribits_create_reverse_list(${PROJECT_NAME}_NOTDISABLED_INTERNAL_PACKAGES
${PROJECT_NAME}_REVERSE_NOTDISABLED_INTERNAL_PACKAGES)

message("\nEnabling subpackages for hard enables of parent packages"
Expand Down Expand Up @@ -200,7 +200,7 @@ macro(tribits_sweep_forward_apply_enables)

tribits_get_sublist_enabled( ${PROJECT_NAME}_DEFINED_INTERNAL_PACKAGES
${PROJECT_NAME}_ENABLED_INTERNAL_PACKAGES "")
tribit_create_reverse_list(${PROJECT_NAME}_ENABLED_INTERNAL_PACKAGES
tribits_create_reverse_list(${PROJECT_NAME}_ENABLED_INTERNAL_PACKAGES
${PROJECT_NAME}_REVERSE_ENABLED_INTERNAL_PACKAGES)

message("\nSweep backward enabling all forward test dependent packages because"
Expand Down Expand Up @@ -295,7 +295,7 @@ macro(tribits_sweep_backward_enable_upstream_packages)

tribits_get_sublist_nondisabled( ${PROJECT_NAME}_DEFINED_PACKAGES
${PROJECT_NAME}_NOTDISABLED_PACKAGES "")
tribit_create_reverse_list(${PROJECT_NAME}_NOTDISABLED_PACKAGES
tribits_create_reverse_list(${PROJECT_NAME}_NOTDISABLED_PACKAGES
${PROJECT_NAME}_REVERSE_NOTDISABLED_PACKAGES)

message("\nEnabling all required${tap1_extraMsgStr} upstream packages for current"
Expand Down Expand Up @@ -893,7 +893,7 @@ macro(tribits_private_disable_required_package_enables
fwdDepPkgName packageName libraryDep
)
tribits_get_package_enable_status(${fwdDepPkgName} "" fwdDepPkgEnableVarName)
if (${fwdDepPkgEnableVarName} OR ${fwdDepPkgEnableVarName} STREQUAL "")
if (${fwdDepPkgEnableVarName} OR "${${fwdDepPkgEnableVarName}}" STREQUAL "")
if ("${libraryDep}" STREQUAL "TRUE")
tribits_private_print_disable_required_package_enable(
${packageName} ${fwdDepPkgEnableVarName}
Expand Down Expand Up @@ -922,7 +922,6 @@ macro(tribits_private_disable_required_package_enables
endif()
endmacro()


function(tribits_private_print_disable_required_package_enable
packageName packageEnableSomethingVarName fwdDepPkgName
depTypeStr
Expand Down
6 changes: 3 additions & 3 deletions tribits/core/utils/TribitsCreateReverseList.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@
# @HEADER


# @MACRO: tribit_create_reverse_list()
# @MACRO: tribits_create_reverse_list()
#
# Create a reverse list var in one shot.
#
# Usage::
#
# tribit_create_reverse_list(<oldListName> <newListName>)
# tribits_create_reverse_list(<oldListName> <newListName>)
#
macro(tribit_create_reverse_list oldListName newListName)
macro(tribits_create_reverse_list oldListName newListName)
set(${newListName} ${${oldListName}})
list(REVERSE ${newListName})
endmacro()
2 changes: 1 addition & 1 deletion tribits/doc/guides/UtilsMacroFunctionDocTemplate.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
@FUNCTION: tribits_add_enum_cache_var() +
@FUNCTION: tribits_deprecated() +
@FUNCTION: tribits_deprecated_command() +
@MACRO: tribit_create_reverse_list() +
@MACRO: tribits_create_reverse_list() +
@FUNCTION: tribits_strip_quotes_from_str() +
@FUNCTION: unittest_compare_const() +
@FUNCTION: unittest_has_substr_const() +
Expand Down

0 comments on commit 9289e09

Please sign in to comment.