Skip to content

Commit 5ec6024

Browse files
easelclaude
andcommitted
fix(server): make CURL optional for replay_http_server target
find_package(CURL REQUIRED) made libcurl-dev a hard configure-time dependency for any build with DFLASH27B_TESTS=ON, even though the rest of the build (dflash_server, server unit tests) already gates its own curl usage. Hosts without libcurl-dev that previously configured cleanly now fail. Drop REQUIRED and skip the replay_http_server target when CURL is not found. The pytest driver checks for the binary and self-skips. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 0910b32 commit 5ec6024

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

server/CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -884,8 +884,13 @@ if(DFLASH27B_TESTS)
884884
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/replay_http_server.cpp")
885885
# http_server.cpp #includes <curl/curl.h> for its upstream-proxy
886886
# passthrough; replay_http_server compiles that TU so it must link
887-
# libcurl even though the stub backend itself doesn't use it.
888-
find_package(CURL REQUIRED)
887+
# libcurl even though the stub backend itself doesn't use it. Skip
888+
# the target on hosts without libcurl-dev rather than fail configure
889+
# — the rest of the build (server unit tests, dflash_server, etc.)
890+
# has its own CURL gating and shouldn't be blocked by the test rig.
891+
find_package(CURL)
892+
endif()
893+
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/replay_http_server.cpp" AND CURL_FOUND)
889894
add_executable(replay_http_server
890895
test/replay_http_server.cpp
891896
test/scenario_store.cpp

0 commit comments

Comments
 (0)