Skip to content

Commit

Permalink
upgrade FindOrFetchBoost via ValeevGroup/kit-cmake@45e7d0d and suppor…
Browse files Browse the repository at this point in the history
…t BTAS loading if Boost already partially discovered
  • Loading branch information
evaleev committed Jan 22, 2024
1 parent 86e4a21 commit b2c18c7
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 25 deletions.
46 changes: 22 additions & 24 deletions external/boost.cmake
Original file line number Diff line number Diff line change
@@ -1,29 +1,27 @@
# -*- mode: cmake -*-

# Boost can be discovered by every (sub)package but only the top package can build it ...
# if we are the top package need to include the list of Boost components to be built
if("${CMAKE_PROJECT_NAME}" STREQUAL "${PROJECT_NAME}")
set(required_components
headers # BTAS
container # BTAS
iterator # BTAS
random # BTAS
)
if (DEFINED Boost_REQUIRED_COMPONENTS)
list(APPEND Boost_REQUIRED_COMPONENTS ${required_components})
list(REMOVE_DUPLICATES Boost_REQUIRED_COMPONENTS)
else()
set(Boost_REQUIRED_COMPONENTS "${required_components}" CACHE STRING "Required components of Boost to discovered or built")
endif()
set(optional_components
serialization # BTAS
)
if (DEFINED Boost_OPTIONAL_COMPONENTS)
list(APPEND Boost_OPTIONAL_COMPONENTS ${optional_components})
list(REMOVE_DUPLICATES Boost_OPTIONAL_COMPONENTS)
else()
set(Boost_OPTIONAL_COMPONENTS "${optional_components}" CACHE STRING "Optional components of Boost to discovered or built")
endif()
# Boost can be discovered by every (sub)package but only the top package can *build* it ...
# in either case must declare the components used by BTAS
set(required_components
headers # BTAS
container # BTAS
iterator # BTAS
random # BTAS
)
if (DEFINED Boost_REQUIRED_COMPONENTS)
list(APPEND Boost_REQUIRED_COMPONENTS ${required_components})
list(REMOVE_DUPLICATES Boost_REQUIRED_COMPONENTS)
else()
set(Boost_REQUIRED_COMPONENTS "${required_components}" CACHE STRING "Required components of Boost to discovered or built")
endif()
set(optional_components
serialization # BTAS
)
if (DEFINED Boost_OPTIONAL_COMPONENTS)
list(APPEND Boost_OPTIONAL_COMPONENTS ${optional_components})
list(REMOVE_DUPLICATES Boost_OPTIONAL_COMPONENTS)
else()
set(Boost_OPTIONAL_COMPONENTS "${optional_components}" CACHE STRING "Optional components of Boost to discovered or built")
endif()

if (BTAS_BUILD_DEPS_FROM_SOURCE AND NOT DEFINED Boost_FETCH_IF_MISSING)
Expand Down
2 changes: 1 addition & 1 deletion external/versions.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set(BTAS_TRACKED_VGCMAKEKIT_TAG 8713beb71ff6b7d4b1c758e9e1c7d814bd97b0af)
set(BTAS_TRACKED_VGCMAKEKIT_TAG 45e7d0d8d7f994a88c5af5fc082332db7bd0d6b3)

# likely can use earlier, but
# - as of oct 2023 tested with 1.71 and up only
Expand Down

0 comments on commit b2c18c7

Please sign in to comment.