Skip to content

Commit 57d10ee

Browse files
committed
Gate building Boost.Beast sample on Boost version
1 parent 899e09f commit 57d10ee

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

.github/workflows/linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
run: |
4242
$cmakeBuildType = '${{ matrix.config }}'
4343
44-
cmake "-DCMAKE_BUILD_TYPE=$cmakeBuildType" -G Ninja ${{ github.workspace }}
44+
cmake "-DCMAKE_BUILD_TYPE=$cmakeBuildType" "-DGRAPHQL_BUILD_HTTP_SAMPLE=OFF" -G Ninja ${{ github.workspace }}
4545
4646
- name: Build
4747
working-directory: build/

samples/CMakeLists.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,12 @@ add_subdirectory(today)
99
add_subdirectory(validation)
1010

1111
if(GRAPHQL_BUILD_HTTP_SAMPLE)
12-
if(EXISTS "${Boost_INCLUDE_DIR}/boost/beast.hpp")
13-
add_subdirectory(proxy)
14-
else()
15-
message(WARNING "GRAPHQL_BUILD_HTTP_SAMPLE requires the Boost.Beast header-only library. Not found in ${Boost_INCLUDE_DIR}.")
12+
find_package(Boost QUIET)
13+
if(Boost_FOUND)
14+
if(Boost_VERSIION VERSION_GREATER_EQUAL "1.81.0" AND EXISTS "${Boost_INCLUDE_DIR}/boost/beast.hpp")
15+
add_subdirectory(proxy)
16+
else()
17+
message(WARNING "GRAPHQL_BUILD_HTTP_SAMPLE requires the Boost.Beast header-only library >= 1.81.0, but it was not found in ${Boost_INCLUDE_DIR}.")
18+
endif()
1619
endif()
1720
endif()

0 commit comments

Comments
 (0)