Skip to content

Commit

Permalink
update vendor/foxy to use custom certify
Browse files Browse the repository at this point in the history
  • Loading branch information
cwaldren-ld committed Oct 7, 2024
1 parent a9bfe15 commit 201e989
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
17 changes: 15 additions & 2 deletions vendor/foxy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ project(
"Session-based abstractions for Beast + URL parsing and pct-coding"
)

set(CMAKE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
include(${CMAKE_FILES}/certify.cmake)

find_package(
Boost ${foxy_minimum_boost_version}
REQUIRED
Expand Down Expand Up @@ -163,8 +166,14 @@ add_library(
target_include_directories(test_utils PUBLIC test/include)
target_link_libraries(test_utils PUBLIC foxy)

option(BUILD_TESTING "Build Foxy Testsuite" OFF)
if (BUILD_TESTING)
cmake_dependent_option(FOXY_BUILD_TESTING
"Build the C++ unit tests."
ON
"BUILD_TESTING"
OFF
)

if (FOXY_BUILD_TESTING)
include(CTest)

find_package(Catch2 CONFIG REQUIRED)
Expand Down Expand Up @@ -248,3 +257,7 @@ if (FOXY_FUZZ)
target_link_options(uri-parser PRIVATE "-fsanitize=fuzzer")
endif ()

install(
TARGETS foxy
EXPORT ${PROJECT_NAME}Targets
)
27 changes: 27 additions & 0 deletions vendor/foxy/cmake/certify.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
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/cwaldren-ld/certify.git
GIT_TAG 8fc3024f97ffcc7442e30e1fe6ddff54b45e35d6
)

# The tests in certify don't compile.
set(PREVIOUS_BUILD_TESTING ${BUILD_TESTING})
set(BUILD_TESTING OFF)

FetchContent_MakeAvailable(certify)

set(BUILD_TESTING ${PREVIOUS_BUILD_TESTING})

install(
TARGETS core
EXPORT ${PROJECT_NAME}Targets
)

0 comments on commit 201e989

Please sign in to comment.