mirror of
https://github.com/boostorg/cmake.git
synced 2026-01-19 04:02:15 +00:00
Ensure compatibility with CMake < 3.20
CMake supports `list(REMOVE_ITEM` without any items only since 3.20
This commit is contained in:
@@ -263,7 +263,9 @@ function(__boost_scan_dependencies lib var sub_folder)
|
||||
|
||||
endforeach()
|
||||
|
||||
list(REMOVE_ITEM result ${libs_to_exclude})
|
||||
if(libs_to_exclude)
|
||||
list(REMOVE_ITEM result ${libs_to_exclude})
|
||||
endif()
|
||||
list(REMOVE_DUPLICATES result)
|
||||
set(${var} ${result} PARENT_SCOPE)
|
||||
|
||||
@@ -355,7 +357,9 @@ if(BOOST_INCLUDE_LIBRARIES)
|
||||
__boost_gather_dependencies(__boost_dependencies "${BOOST_INCLUDE_LIBRARIES}" OFF)
|
||||
if(BUILD_TESTING)
|
||||
__boost_gather_dependencies(__boost_test_dependencies "${BOOST_INCLUDE_LIBRARIES}" ON)
|
||||
list(REMOVE_ITEM __boost_test_dependencies ${__boost_dependencies})
|
||||
if(__boost_dependencies)
|
||||
list(REMOVE_ITEM __boost_test_dependencies ${__boost_dependencies})
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
set(__boost_dependencies "")
|
||||
|
||||
Reference in New Issue
Block a user