Skip to content

Commit 129d69f

Browse files
committed
fix(deps): use updated CMake variables for Boost.Beast detection
1 parent 6ab4af0 commit 129d69f

File tree

4 files changed

+12
-22
lines changed

4 files changed

+12
-22
lines changed

samples/CMakeLists.txt

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,12 @@ endif()
1313

1414
if(GRAPHQL_BUILD_HTTP_SAMPLE)
1515
find_package(boost_beast CONFIG QUIET)
16-
if(Boost_FOUND)
17-
if(Boost_VERSION VERSION_GREATER_EQUAL "1.81.0")
18-
try_compile(TEST_RESULT
19-
${CMAKE_CURRENT_BINARY_DIR}
20-
${CMAKE_CURRENT_SOURCE_DIR}/../cmake/test_boost_beast.cpp
21-
CMAKE_FLAGS -DINCLUDE_DIRECTORIES:STRING=${Boost_INCLUDE_DIRS}
22-
CXX_STANDARD 20)
23-
24-
if(TEST_RESULT)
25-
message(STATUS "Using Boost.Beast ${Boost_VERSION}")
26-
add_subdirectory(proxy)
27-
else()
28-
message(WARNING "GRAPHQL_BUILD_HTTP_SAMPLE requires the Boost.Beast header-only library and a toolchain that supports co_await in Boost.Asio.")
29-
endif()
16+
if(boost_beast_FOUND)
17+
if(boost_beast_VERSION VERSION_GREATER_EQUAL "1.81.0")
18+
message(STATUS "Using Boost.Beast ${boost_beast_VERSION}")
19+
add_subdirectory(proxy)
3020
else()
31-
message(WARNING "GRAPHQL_BUILD_HTTP_SAMPLE requires the Boost.Beast header-only library >= 1.81.0, but only ${Boost_VERSION} was found in ${Boost_INCLUDE_DIR}.")
21+
message(WARNING "GRAPHQL_BUILD_HTTP_SAMPLE requires the Boost.Beast header-only library >= 1.81.0, but only ${boost_beast_VERSION} was found.")
3222
endif()
3323
endif()
3424
endif()

samples/proxy/query/ProxyClient.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
#include <string>
1919
#include <vector>
2020

21-
// Check if the library version is compatible with clientgen 4.5.0
22-
static_assert(graphql::internal::MajorVersion == 4, "regenerate with clientgen: major version mismatch");
23-
static_assert(graphql::internal::MinorVersion == 5, "regenerate with clientgen: minor version mismatch");
21+
// Check if the library version is compatible with clientgen 5.0.0
22+
static_assert(graphql::internal::MajorVersion == 5, "regenerate with clientgen: major version mismatch");
23+
static_assert(graphql::internal::MinorVersion == 0, "regenerate with clientgen: minor version mismatch");
2424

2525
namespace graphql::client {
2626

samples/proxy/schema/ProxySchema.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
#include <string>
2020
#include <string_view>
2121

22-
// Check if the library version is compatible with schemagen 4.5.0
23-
static_assert(graphql::internal::MajorVersion == 4, "regenerate with schemagen: major version mismatch");
24-
static_assert(graphql::internal::MinorVersion == 5, "regenerate with schemagen: minor version mismatch");
22+
// Check if the library version is compatible with schemagen 5.0.0
23+
static_assert(graphql::internal::MajorVersion == 5, "regenerate with schemagen: major version mismatch");
24+
static_assert(graphql::internal::MinorVersion == 0, "regenerate with schemagen: minor version mismatch");
2525

2626
namespace graphql {
2727
namespace proxy {

samples/proxy/schema/ProxySchema.ixx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module;
99

1010
export module GraphQL.Proxy.ProxySchema;
1111

12-
namespace included = graphql::proxy;
12+
export import GraphQL.Proxy.QueryObject;
1313

1414
export namespace graphql::proxy {
1515

0 commit comments

Comments
 (0)