-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(deps): swap certify dependency to a fork with fixed cmake configu… #449
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,11 @@ endif () | |
|
||
find_package(Threads REQUIRED) | ||
|
||
set(CMAKE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/cmake) | ||
|
||
|
||
include(${CMAKE_FILES}/certify.cmake) | ||
|
||
add_library( | ||
foxy OBJECT | ||
include/foxy.hpp | ||
|
@@ -153,6 +158,13 @@ target_link_libraries( | |
certify::core | ||
) | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The original |
||
if (APPLE) | ||
find_library(COREFOUNDATION_LIBRARY CoreFoundation) | ||
find_library(SECURITY_LIBRARY Security) | ||
target_link_libraries(foxy PRIVATE ${COREFOUNDATION_LIBRARY} ${SECURITY_LIBRARY}) | ||
endif () | ||
|
||
|
||
add_library( | ||
test_utils | ||
|
||
|
@@ -167,7 +179,8 @@ option(BUILD_TESTING "Build Foxy Testsuite" OFF) | |
if (BUILD_TESTING) | ||
include(CTest) | ||
|
||
find_package(Catch2 CONFIG REQUIRED) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Given I'm swapping out the certify library, I figured it would be good to have foxy's tests enabled. This necessitates grabbing catch2 with FetchContent. |
||
include(${CMAKE_FILES}/catch2.cmake) | ||
|
||
find_package(Boost ${foxy_minimum_boost_version} REQUIRED coroutine thread container) | ||
|
||
add_executable( | ||
|
@@ -179,7 +192,6 @@ if (BUILD_TESTING) | |
test/export_connect_fields_test.cpp | ||
test/iterator_test.cpp | ||
test/listener_test.cpp | ||
test/main.cpp | ||
test/parse_uri_test.cpp | ||
test/pct_decode_test.cpp | ||
test/pct_encode_test.cpp | ||
|
@@ -200,10 +212,11 @@ if (BUILD_TESTING) | |
foxy_tests | ||
PRIVATE | ||
test_utils | ||
Catch2::Catch2 | ||
Catch2::Catch2WithMain | ||
Boost::coroutine | ||
Boost::thread | ||
Boost::container | ||
certify::core | ||
) | ||
|
||
file(COPY test/root-cas.pem DESTINATION ${CMAKE_BINARY_DIR}) | ||
|
@@ -247,4 +260,3 @@ if (FOXY_FUZZ) | |
target_compile_options(uri-parser PRIVATE "-fsanitize=fuzzer") | ||
target_link_options(uri-parser PRIVATE "-fsanitize=fuzzer") | ||
endif () | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
cmake_minimum_required(VERSION 3.11) | ||
|
||
FetchContent_Declare( | ||
Catch2 | ||
GIT_REPOSITORY https://github.com/catchorg/Catch2.git | ||
GIT_TAG fa43b77429ba76c462b1898d6cd2f2d7a9416b14 | ||
) | ||
|
||
FetchContent_MakeAvailable(Catch2) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
cmake_minimum_required(VERSION 3.11) | ||
|
||
include(FetchContent) | ||
|
||
if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.24") | ||
# Affects robustness of timestamp checking on FetchContent dependencies. | ||
cmake_policy(SET CMP0135 NEW) | ||
endif () | ||
|
||
|
||
FetchContent_Declare(certify | ||
GIT_REPOSITORY https://github.com/jens-diewald/certify.git | ||
GIT_TAG 9185a824e2085b5632be542c0377204a05a4fa40 | ||
) | ||
|
||
# The tests in certify don't compile. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TODO: add a todo here to see if I can get these compiling. |
||
set(PREVIOUS_BUILD_TESTING ${BUILD_TESTING}) | ||
set(BUILD_TESTING OFF) | ||
|
||
FetchContent_MakeAvailable(certify) | ||
|
||
set(BUILD_TESTING ${PREVIOUS_BUILD_TESTING}) | ||
|
||
# Override the include directories for certify::core | ||
target_include_directories(core INTERFACE | ||
$<BUILD_INTERFACE:${certify_SOURCE_DIR}/include> | ||
$<INSTALL_INTERFACE:include> | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// | ||
Check notice on line 1 in vendor/foxy/test/allocator_client_test.cpp GitHub Actions / cpp-linterRun clang-format on vendor/foxy/test/allocator_client_test.cpp
|
||
// Copyright (c) 2018-2019 Christian Mazakas (christian dot mazakas at gmail dot com) | ||
// | ||
// Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt | ||
|
@@ -17,7 +17,7 @@ | |
|
||
#include <memory> | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The new Catch2 has changed their headers around. |
||
#include <catch2/catch.hpp> | ||
#include <catch2/catch_all.hpp> | ||
|
||
#include <iostream> | ||
|
||
|
@@ -39,7 +39,7 @@ | |
namespace | ||
{ | ||
#include <boost/asio/yield.hpp> | ||
struct client_op : asio::coroutine | ||
Check warning on line 42 in vendor/foxy/test/allocator_client_test.cpp GitHub Actions / cpp-linter/vendor/foxy/test/allocator_client_test.cpp:42:8 [cppcoreguidelines-special-member-functions]
|
||
{ | ||
using allocator_type = pmr::polymorphic_allocator<char>; | ||
|
||
|
@@ -58,28 +58,28 @@ | |
request_type& request_, | ||
parser_type& parser_, | ||
bool& was_valid_, | ||
allocator_type alloc_) | ||
Check warning on line 61 in vendor/foxy/test/allocator_client_test.cpp GitHub Actions / cpp-linter/vendor/foxy/test/allocator_client_test.cpp:61:28 [performance-unnecessary-value-param]
|
||
: client(client_) | ||
, request(request_) | ||
, parser(parser_) | ||
, was_valid(was_valid_) | ||
, alloc(std::move(alloc_)) | ||
Check warning on line 66 in vendor/foxy/test/allocator_client_test.cpp GitHub Actions / cpp-linter/vendor/foxy/test/allocator_client_test.cpp:66:13 [performance-move-const-arg]
|
||
{ | ||
} | ||
|
||
auto | ||
get_allocator() const noexcept -> allocator_type | ||
{ | ||
return alloc; | ||
} | ||
|
||
auto | ||
operator()(error_code ec, tcp::endpoint) -> void | ||
Check warning on line 77 in vendor/foxy/test/allocator_client_test.cpp GitHub Actions / cpp-linter/vendor/foxy/test/allocator_client_test.cpp:77:42 [performance-unnecessary-value-param]
|
||
{ | ||
(*this)(ec); | ||
} | ||
|
||
auto operator()(error_code ec = {}) -> void | ||
{ | ||
reenter(this) | ||
{ | ||
|
@@ -99,7 +99,7 @@ | |
|
||
{ | ||
auto& response = parser.get(); | ||
was_valid = (response.result_int() == 200 && response.body().size() > 0 && | ||
Check warning on line 102 in vendor/foxy/test/allocator_client_test.cpp GitHub Actions / cpp-linter/vendor/foxy/test/allocator_client_test.cpp:102:52 [cppcoreguidelines-avoid-magic-numbers
|
||
boost::string_view(response.body()).ends_with("</html>")); | ||
} | ||
} | ||
|
@@ -114,7 +114,7 @@ | |
{ | ||
bool was_valid = false; | ||
|
||
asio::io_context io(1); | ||
|
||
auto const page_size = std::size_t{1024 * 512}; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since certify is really a dependency of foxy, moving this into foxy.