cmakepp_lang/utilities/compare_lists
- cmakepp_lang/utilities/compare_lists.cpp_compare_lists(result lhs rhs)
Encapsulates the process of comparing two CMake lists to one another.
Two CMake lists are equal if they contain the same number of elements and if the \(i\)-th element in
lhs
compares equal to the \(i\)-th element ofrhs
undercpp_equal
for all elements in the list. In particular this means that the lists must have the same order and that we compare the values of CMakePP objects, not their this-pointers.- Parameters:
result (desc) – Name for variable which will hold the result.
lhs (list*) – Identifier containing the first list to compare.
rhs (list*) – Identifier containing the second list to comapre.
- Returns:
result
will be set toTRUE
if the two lists are equal andFALSE
otherwise.- Return type:
bool
- Variables:
CMAKEPP_LANG_DEBUG_MODE (bool) – Used to determine if CMakePP is being run in debug mode or not.
Error Checking
If CMakePP is run in debug mode, this function will assert that the function is only provided three arguments (preventing the user from accidentally dereferencing one of the input lists in most cases) and that the arguments are all of type
desc
.