CMake: Fix list_assert_duplicates

`list_assert_duplicates` validates a list that should contain no
duplicates, contains no duplicates, with scope keywords now being
allowed in `INC` sections, there is the situation where multiple
include paths can have the same scope set on them causing
`list_assert_duplicates` to error out.

To remedy this we remove the scope keywords from the list first,
before running the test.
This commit is contained in:
Ray Molenkamp 2023-07-07 11:00:29 -06:00
parent f36d8eb064
commit 4fa30a317d

@ -33,6 +33,7 @@ function(list_assert_duplicates
# message(STATUS "list data: ${list_id}")
list(REMOVE_ITEM list_id "PUBLIC" "PRIVATE" "INTERFACE")
list(LENGTH list_id _len_before)
list(REMOVE_DUPLICATES list_id)
list(LENGTH list_id _len_after)