Skip to content

Commit bca0110

Browse files
committed
s
1 parent 728aea6 commit bca0110

3 files changed

Lines changed: 9 additions & 7 deletions

File tree

.github/workflows/CI-unixish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
run: |
6363
# make sure Boost is not used when disabled even though it is available
6464
cmake -S . -B cmake.output.boost-no -G "Unix Makefiles" -DUSE_BOOST=Off
65-
if grep '\-DHAVE_BOOST' ./cmake.output.boost-no/compile_commands.json; then
65+
if grep -q '\-DHAVE_BOOST' ./cmake.output.boost-no/compile_commands.json; then
6666
exit 1
6767
else
6868
exit 0
@@ -71,7 +71,7 @@ jobs:
7171
- name: Run CMake on macOS (with Boost)
7272
run: |
7373
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
74-
grep '\-DHAVE_BOOST' ./cmake.output.boost/compile_commands.json
74+
grep -q '\-DHAVE_BOOST' ./cmake.output.boost/compile_commands.json
7575
7676
- name: Build with CMake on macOS (with Boost)
7777
run: |

cmake/findDependencies.cmake

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,12 @@ if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.30")
8383
cmake_policy(SET CMP0167 NEW)
8484
endif()
8585

86-
# we are only using the header-only "container" component so we can unconditionally search for it
87-
if(USE_BOOST AND NOT USE_BOOST STREQUAL "Auto")
88-
find_package(Boost REQUIRED)
89-
else()
90-
find_package(Boost)
86+
if(USE_BOOST)
87+
if(USE_BOOST STREQUAL "Auto")
88+
find_package(Boost)
89+
else()
90+
find_package(Boost REQUIRED)
91+
endif()
9192
endif()
9293

9394
find_program(LIBXML2_XMLLINT_EXECUTABLE xmllint)

cmake/options.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ if(WARNINGS_ARE_ERRORS)
3131
endif()
3232
option(EXTERNALS_AS_SYSTEM "Treat externals as system includes" OFF)
3333

34+
# we are only using the header-only "container" Boost component so we can unconditionally search for it by default
3435
set(USE_MATCHCOMPILER "Auto" CACHE STRING "Usage of match compiler")
3536
set_property(CACHE USE_MATCHCOMPILER PROPERTY STRINGS Auto Off On Verify)
3637
if(USE_MATCHCOMPILER)

0 commit comments

Comments
 (0)