CPM.cmake icon indicating copy to clipboard operation
CPM.cmake copied to clipboard

Boost with find package and global

Open blozano-tt opened this issue 10 months ago • 2 comments

For some reason I can’t force find_package fallback here when doing CPM_USE_LOCAL_PACKAGE

Any ideas?

https://github.com/tenstorrent/tt-metal/actions/runs/13209960075/job/36882119965

CPMAddPackage(
    NAME Boost
    VERSION 1.86.0
    URL
        https://github.com/boostorg/boost/releases/download/boost-1.86.0/boost-1.86.0-cmake.tar.xz
        URL_HASH
        SHA256=2c5ec5edcdff47ff55e27ed9560b0a0b94b07bd07ed9928b476150e16b0efc57
    OPTIONS
        "BOOST_ENABLE_CMAKE ON"
        "BOOST_SKIP_INSTALL_RULES ON"
        "BUILD_SHARED_LIBS OFF"
        "BOOST_INCLUDE_LIBRARIES core\\\;container\\\;smart_ptr\\\;interprocess"
    FIND_PACKAGE_ARGUMENTS "GLOBAL"
)

blozano-tt avatar Feb 08 '25 00:02 blozano-tt

Maybe I need

COMPONENTS core smart_ptr container interprocess

blozano-tt avatar Feb 08 '25 00:02 blozano-tt

This is a painful rabbit hole...

I am learning that if you install boost system wide, the BoostConfig.cmake has only a couple targets:

  • Boost::boost
  • Boost::headers

The targets Boost::core, Boost::container, Boost::smart_ptr, Boost::interprocess are not available.

I have yet to figure out how you can install boost in the system with those targets. I am trying to build from source using b2.

blozano-tt avatar Feb 08 '25 17:02 blozano-tt