Skip to content

Commit 201e989

Browse files
committed
update vendor/foxy to use custom certify
1 parent a9bfe15 commit 201e989

File tree

2 files changed

+42
-2
lines changed

2 files changed

+42
-2
lines changed

vendor/foxy/CMakeLists.txt

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ project(
2424
"Session-based abstractions for Beast + URL parsing and pct-coding"
2525
)
2626

27+
set(CMAKE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
28+
include(${CMAKE_FILES}/certify.cmake)
29+
2730
find_package(
2831
Boost ${foxy_minimum_boost_version}
2932
REQUIRED
@@ -163,8 +166,14 @@ add_library(
163166
target_include_directories(test_utils PUBLIC test/include)
164167
target_link_libraries(test_utils PUBLIC foxy)
165168

166-
option(BUILD_TESTING "Build Foxy Testsuite" OFF)
167-
if (BUILD_TESTING)
169+
cmake_dependent_option(FOXY_BUILD_TESTING
170+
"Build the C++ unit tests."
171+
ON
172+
"BUILD_TESTING"
173+
OFF
174+
)
175+
176+
if (FOXY_BUILD_TESTING)
168177
include(CTest)
169178

170179
find_package(Catch2 CONFIG REQUIRED)
@@ -248,3 +257,7 @@ if (FOXY_FUZZ)
248257
target_link_options(uri-parser PRIVATE "-fsanitize=fuzzer")
249258
endif ()
250259

260+
install(
261+
TARGETS foxy
262+
EXPORT ${PROJECT_NAME}Targets
263+
)

vendor/foxy/cmake/certify.cmake

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
cmake_minimum_required(VERSION 3.11)
2+
3+
include(FetchContent)
4+
5+
if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.24")
6+
# Affects robustness of timestamp checking on FetchContent dependencies.
7+
cmake_policy(SET CMP0135 NEW)
8+
endif ()
9+
10+
11+
FetchContent_Declare(certify
12+
GIT_REPOSITORY https://github.com/cwaldren-ld/certify.git
13+
GIT_TAG 8fc3024f97ffcc7442e30e1fe6ddff54b45e35d6
14+
)
15+
16+
# The tests in certify don't compile.
17+
set(PREVIOUS_BUILD_TESTING ${BUILD_TESTING})
18+
set(BUILD_TESTING OFF)
19+
20+
FetchContent_MakeAvailable(certify)
21+
22+
set(BUILD_TESTING ${PREVIOUS_BUILD_TESTING})
23+
24+
install(
25+
TARGETS core
26+
EXPORT ${PROJECT_NAME}Targets
27+
)

0 commit comments

Comments
 (0)