Skip to content
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

Repalce usage of legacy vars <Package>_[LIB|TEST]_[REQUIRED|OPTIONAL]_DEP_[PACKAGES|TPLS] (#63) #546

Merged
merged 35 commits into from
Dec 12, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
c24337d
Remove usage of deprecated function (#429)
bartlettroscoe Nov 3, 2022
0fbf95a
Remove extra spaces at end of lines (#63)
bartlettroscoe Nov 3, 2022
3824dfc
Add common_tpls/FindTPLLAPACKDependencies.cmake (#63)
bartlettroscoe Oct 19, 2022
d410d63
Don't overwrite <Package>_[LIB|TEST]_DEFINED_DEPENDENCIES, change dep…
bartlettroscoe Oct 19, 2022
1576bae
Add some more checks and adjust code for setting <Package>_PACKAGE_BU…
bartlettroscoe Oct 19, 2022
f59c124
Remove unused var <Project>_REVERSE_DEFINED_INTERNAL_TOPLEVEL_PACKAGE…
bartlettroscoe Oct 19, 2022
c11a646
WIP: Refactor tribits_sweep_forward_apply_disables(), fix TPL fwd dep…
bartlettroscoe Oct 19, 2022
68bee4d
WIP: Change name from ${PROJECT_NAME}_[REVERSE_]NOTDISABLED_PACKAGES …
bartlettroscoe Oct 20, 2022
c59ff9b
WIP: Code cleanup (#63)
bartlettroscoe Oct 20, 2022
593a935
Add new macro tribit_create_reverse_list() (#63)
bartlettroscoe Nov 2, 2022
2ce0a28
WIP: Refactor tribits_sweep_forward_apply_enables() to new deps vars …
bartlettroscoe Oct 21, 2022
7c49749
WIP: Refactor tribits_disable_and_enable_tests_and_examples() to new …
bartlettroscoe Oct 21, 2022
7fbd2c5
WIP: Refactor tribits_sweep_backward_enable_upstream_packages() to us…
bartlettroscoe Oct 22, 2022
99779a6
WIP: Change name from tribits_get_X_list() to tribits_get_sublist_X()…
bartlettroscoe Nov 4, 2022
561d8cb
WIP: Move tribits_get_sublist_X() functions into new module, add doc …
bartlettroscoe Nov 4, 2022
da71f3c
WIP: Print of optional package enable is overridden by disable (#63)
bartlettroscoe Nov 14, 2022
a4c4882
WIP: Refactor tribits_sweep_backward_enable_upstream_packages() to pr…
bartlettroscoe Nov 15, 2022
2e5cc33
WIP: Delete many TPL-specific functions/macros (#63)
bartlettroscoe Nov 16, 2022
f8b319c
Refactor tribits_set_cache_vars_for_current_enabled_packages() to use…
bartlettroscoe Nov 16, 2022
a56e094
WIP: Refactor tribits_do_final_parent_packages_enables_for_subpackage…
bartlettroscoe Nov 16, 2022
835c415
WIP: Move tribits_set_up_enabled_lists_and_pkg_idx() into TribitsAdju…
bartlettroscoe Nov 16, 2022
d305a4a
Change name to tribits_setup_enabled_lists_and_pkg_idxs(), cleanup (#63)
bartlettroscoe Nov 16, 2022
577ca23
WIP: Refactor tribits_setup_direct_packages_dependencies_lists_and_li…
bartlettroscoe Nov 18, 2022
71377ae
WIP: tribits_package_set_full_enabled_dep_packages(): Rename local va…
bartlettroscoe Nov 18, 2022
7160274
WIP: Factor out tribits_package_build_unsorted_full_enabled_dep_packa…
bartlettroscoe Nov 18, 2022
db8a25c
WIP: Factor out tribits_package_sort_full_enabled_dep_packages() (#63)
bartlettroscoe Nov 18, 2022
dcd6161
WIP: Refactor tribits_package_build_unsorted_full_enabled_dep_package…
bartlettroscoe Nov 22, 2022
a9cd4da
WIP: Update setting of CPACK_COMPONENT_<upstreamComp>_DEPENDS to use …
bartlettroscoe Nov 22, 2022
31eb579
WIP: Remove function tribits_gather_enabled_items() (#63)
bartlettroscoe Nov 22, 2022
432a316
WIP: Reorder functions in clean code ordering (#63)
bartlettroscoe Nov 22, 2022
a7d4c49
WIP: Cleanup before more refactorig (#63)
bartlettroscoe Nov 22, 2022
6255e05
WIP: Refactor tribits_dump_deps_xml_file() to use new deps files
bartlettroscoe Nov 23, 2022
8473b6f
WIP: Remove legacy package deps lists (#63)
bartlettroscoe Nov 23, 2022
7a39177
WIP: Add test for implicit TPL enable (#63)
bartlettroscoe Dec 7, 2022
a83361a
WIP: Remove some commented out print_var() and message() lines (#63)
bartlettroscoe Dec 7, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ tribits_add_advanced_test( TestingFunctionMacro_UnitTests
-D${PROJECT_NAME}_TRIBITS_DIR=${${PROJECT_NAME}_TRIBITS_DIR}
-P "${CMAKE_CURRENT_SOURCE_DIR}/TestingFunctionMacro_UnitTests.cmake"
PASS_REGULAR_EXPRESSION_ALL
"Final UnitTests Result: num_run = 719"
"Final UnitTests Result: num_run = 721"
"Final UnitTests Result: PASSED"
)

Expand Down
24 changes: 23 additions & 1 deletion test/core/TestingFunctionMacro_UnitTests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ include(TribitsTplFindIncludeDirsAndLibraries)
include(TribitsReportInvalidTribitsUsage)
include(TribitsGitRepoVersionInfo)
include(TribitsDeprecatedHelpers)
include(TribitsCreateReverseList)
include(UnitTestHelpers)
include(GlobalSet)
include(GlobalNullSet)
Expand Down Expand Up @@ -132,6 +133,26 @@ function(unittest_append_string_var)
endfunction()


function(unittest_tribit_create_reverse_list)

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

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


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

endfunction()


function(unittest_tribits_find_python_interp)

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

unittest_append_string_var()
unittest_tribit_create_reverse_list()
unittest_tribits_find_python_interp()
unittest_tribits_standardize_abs_paths()
unittest_tribits_dir_is_basedir()
Expand Down Expand Up @@ -4813,4 +4835,4 @@ message("*** Determine final result of all unit tests")
message("***\n")

# Pass in the number of expected tests that must pass!
unittest_final_result(719)
unittest_final_result(721)
52 changes: 52 additions & 0 deletions tribits/core/utils/TribitsCreateReverseList.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# @HEADER
# ************************************************************************
#
# TriBITS: Tribal Build, Integrate, and Test System
# Copyright 2013 Sandia Corporation
#
# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
# the U.S. Government retains certain rights in this software.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of the Corporation nor the names of the
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# ************************************************************************
# @HEADER


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