File tree Expand file tree Collapse file tree 2 files changed +56
-5
lines changed Expand file tree Collapse file tree 2 files changed +56
-5
lines changed Original file line number Diff line number Diff line change @@ -382,6 +382,50 @@ jobs:
382382 PATH C:\Boost\bin;%PATH%
383383 cmake --build . --config Release && ctest --output-on-failure --no-tests=error -j 3 -C Release
384384
385+ BoostRoot :
386+ strategy :
387+ matrix :
388+ enable_test : [ON, OFF]
389+ fail-fast : false
390+
391+ runs-on : ubuntu-latest
392+
393+ steps :
394+ - uses : actions/checkout@v4
395+ - name : Setup Boost
396+ run : |
397+ REF=${GITHUB_BASE_REF:-$GITHUB_REF}
398+ REF=${REF#refs/heads/}
399+ echo REF: $REF
400+ BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true
401+ echo BOOST_BRANCH: $BOOST_BRANCH
402+ cd ..
403+ git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
404+ cd boost-root
405+ git submodule update --init --jobs 3
406+ rm -rf tools/cmake/*
407+ cp -r $GITHUB_WORKSPACE/* tools/cmake
408+ - name : Configure each library independently
409+ run : |
410+ set -o pipefail
411+ error=""
412+ cd ../boost-root
413+ for cml in libs/*/CMakeLists.txt; do
414+ lib=$(dirname "${cml#*libs/}")
415+ echo "====================================================================="
416+ echo "Building $lib"
417+ echo "====================================================================="
418+ cmake -DBUILD_TESTING=${{matrix.enable_test}} -DBOOST_INCLUDE_LIBRARIES=$lib -B "__build_$lib" . 2>&1 | tee /tmp/config.log || error+=" $lib"
419+ echo; echo; echo
420+ if grep -F "BOOST_INCLUDE_LIBRARIES has not been found" "/tmp/config.log"; then
421+ error+=" $lib"
422+ fi
423+ done
424+ if [[ -n $error ]]; then
425+ echo "Failed libraries: $error"
426+ exit 1
427+ fi
428+
385429 BoostTest :
386430 strategy :
387431 fail-fast : false
Original file line number Diff line number Diff line change @@ -244,16 +244,23 @@ endmacro()
244244file (GLOB __boost_libraries RELATIVE "${BOOST_SUPERPROJECT_SOURCE_DIR} /libs" "${BOOST_SUPERPROJECT_SOURCE_DIR} /libs/*/CMakeLists.txt" "${BOOST_SUPERPROJECT_SOURCE_DIR} /libs/numeric/*/CMakeLists.txt" )
245245
246246# Check for mistakes in BOOST_INCLUDE_LIBRARIES
247+ if (BOOST_INCLUDE_LIBRARIES)
248+ set (__boost_any_library_found OFF )
249+ foreach (__boost_included_lib IN LISTS BOOST_INCLUDE_LIBRARIES)
247250
248- foreach ( __boost_included_lib IN LISTS BOOST_INCLUDE_LIBRARIES )
251+ if ( NOT " ${ __boost_included_lib} /CMakeLists.txt" IN_LIST __boost_libraries )
249252
250- if ( NOT " ${__boost_included_lib} /CMakeLists.txt" IN_LIST __boost_libraries )
253+ message (WARNING "Library ' ${__boost_included_lib} ' given in BOOST_INCLUDE_LIBRARIES has not been found." )
251254
252- message (WARNING "Library '${__boost_included_lib} ' given in BOOST_INCLUDE_LIBRARIES has not been found." )
255+ else ()
256+ set (__boost_any_library_found ON )
257+ endif ()
253258
259+ endforeach ()
260+ if (NOT __boost_any_library_found)
261+ message (FATAL_ERROR "None of the libraries given in BOOST_INCLUDE_LIBRARIES has been found so no libraries would be build. Verify BOOST_INCLUDE_LIBRARIES (${BOOST_INCLUDE_LIBRARIES} )" )
254262 endif ()
255-
256- endforeach ()
263+ endif ()
257264
258265# Scan for dependencies
259266
You can’t perform that action at this time.
0 commit comments