mirror of
https://github.com/boostorg/cmake.git
synced 2026-01-19 04:02:15 +00:00
Only consider test dependencies of requested libraries
Don't check the test/example folders for (implicit) dependencies as BUILD_TESTING for those is disabled.
This commit is contained in:
@@ -298,7 +298,8 @@ function(__boost_gather_dependencies var input_list with_test)
|
||||
|
||||
__boost_scan_dependencies(${lib} new_deps "")
|
||||
list(APPEND cur_dependencies ${new_deps})
|
||||
if(with_test)
|
||||
# Only consider test dependencies of the input libraries, not transitively as those tests aren't build
|
||||
if(with_test AND lib IN_LIST input_list)
|
||||
__boost_scan_dependencies(${lib} new_deps "test")
|
||||
list(APPEND cur_dependencies ${new_deps})
|
||||
__boost_scan_dependencies(${lib} new_deps "example")
|
||||
@@ -326,7 +327,7 @@ if(BOOST_INCLUDE_LIBRARIES)
|
||||
list(REMOVE_DUPLICATES BOOST_INCLUDE_LIBRARIES)
|
||||
__boost_gather_dependencies(__boost_dependencies "${BOOST_INCLUDE_LIBRARIES}" OFF)
|
||||
if(BUILD_TESTING)
|
||||
__boost_gather_dependencies(__boost_test_dependencies "${BOOST_INCLUDE_LIBRARIES};${__boost_dependencies}" ON)
|
||||
__boost_gather_dependencies(__boost_test_dependencies "${BOOST_INCLUDE_LIBRARIES}" ON)
|
||||
list(REMOVE_ITEM __boost_test_dependencies ${__boost_dependencies})
|
||||
endif()
|
||||
else()
|
||||
|
||||
Reference in New Issue
Block a user