File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,8 +12,18 @@ set(__ignore__ ${CMAKE_C_COMPILER})
1212set (__ignore__ ${CMAKE_C_FLAGS} )
1313
1414if (BOOST_CI_INSTALL_TEST)
15- # Boost as a package (https://github.com/boostorg/cmake#using-boost-after-building-and-installing-it-with-cmake)
16- find_package (Boost CONFIG REQUIRED COMPONENTS openmethod )
15+ # Header-only libraries:
16+ # B2 does not (yet) create/install CMake targets for them, so users are supposed to use the generic Boost::headers target
17+ if (BOOST_CI_INSTALLED_BY STREQUAL "B2" )
18+ find_package (Boost REQUIRED )
19+ add_library (_boost_openmethod INTERFACE )
20+ target_link_libraries (_boost_openmethod INTERFACE Boost::headers )
21+ target_compile_features (_boost_openmethod INTERFACE cxx_std_17 )
22+ add_library (Boost::openmethod ALIAS _boost_openmethod )
23+ else ()
24+ # Boost as a package (https://github.com/boostorg/cmake#using-boost-after-building-and-installing-it-with-cmake)
25+ find_package (Boost CONFIG REQUIRED COMPONENTS openmethod )
26+ endif ()
1727elseif (BOOST_CI_INSTALL_MODULE_TEST)
1828 # Boost.OpenMethod as a package
1929 find_package (boost_openmethod CONFIG REQUIRED )
You can’t perform that action at this time.
0 commit comments