Skip to content

Commit 21f7267

Browse files
committed
fixed #14002 - added missing Boost include for testrunner
1 parent dd6687a commit 21f7267

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

.github/workflows/CI-unixish.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,39 @@ jobs:
248248
run: |
249249
ls lib/*.cpp | xargs -n 1 -P $(nproc) g++ -fsyntax-only -std=c++0x -Ilib -Iexternals -Iexternals/picojson -Iexternals/simplecpp -Iexternals/tinyxml2 -DNONNEG
250250
251+
build_cmake_boost:
252+
253+
strategy:
254+
matrix:
255+
os: [macos-13, macos-15] # non-macos platforms are already built with Boost in other contexts
256+
fail-fast: false # Prefer quick result
257+
258+
runs-on: ${{ matrix.os }}
259+
260+
env:
261+
# TODO: figure out why there are cache misses with PCH enabled
262+
CCACHE_SLOPPINESS: pch_defines,time_macros
263+
264+
steps:
265+
- uses: actions/checkout@v4
266+
with:
267+
persist-credentials: false
268+
269+
- name: ccache
270+
uses: hendrikmuhs/ccache-action@v1.2
271+
with:
272+
key: ${{ github.workflow }}-${{ github.job }}-${{ matrix.os }}
273+
274+
# coreutils contains "nproc"
275+
- name: Install missing software on macos
276+
run: |
277+
brew install coreutils boost
278+
279+
- name: CMake build on macOS (with Boost)
280+
run: |
281+
cmake -S . -B cmake.output.boost -G "Unix Makefiles" -DBUILD_TESTS=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
282+
cmake --build cmake.output.boost -- -j$(nproc)
283+
251284
build:
252285
if: false
253286

test/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ if (BUILD_TESTS)
2020
target_include_directories(testrunner SYSTEM PRIVATE ${tinyxml2_INCLUDE_DIRS})
2121
endif()
2222
target_externals_include_directories(testrunner PRIVATE ${PROJECT_SOURCE_DIR}/externals/simplecpp/)
23+
if (Boost_FOUND)
24+
target_include_directories(testrunner SYSTEM PRIVATE ${Boost_INCLUDE_DIRS})
25+
endif()
2326
if (HAVE_RULES)
2427
target_link_libraries(testrunner ${PCRE_LIBRARY})
2528
endif()

0 commit comments

Comments
 (0)