Skip to content

Commit

Permalink
Detect newer version of libcurl that can perform pipelining.
Browse files Browse the repository at this point in the history
  • Loading branch information
bbockelm committed Dec 4, 2018
1 parent a24929d commit 1e44000
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/XrdTpc.cmake
Expand Up @@ -14,6 +14,24 @@ if( BUILD_TPC )
# The XrdHttp library
#-----------------------------------------------------------------------------
include_directories( ${CURL_INCLUDE_DIRS} )

# On newer versions of libcurl, we can use pipelining of requests.
include (CheckCSourceCompiles)
SET( CMAKE_REQUIRED_INCLUDES "${CURL_INCLUDE_DIRS}" )
check_c_source_compiles("#include <curl/multi.h>
int main(int argc, char** argv)
{
(void)argv;
int foo = CURLMOPT_MAX_HOST_CONNECTIONS;
return 0;
}
" CURL_PIPELINING
)
set(XRD_COMPILE_DEFS "XRD_CHUNK_RESP")
if ( CURL_PIPELINING )
set(XRD_COMPILE_DEFS ${XRD_COMPILE_DEFS} "USE_PIPELINING")
endif ()

add_library(
${LIB_XRD_TPC}
Expand Down Expand Up @@ -46,7 +64,7 @@ if( BUILD_TPC )
INTERFACE_LINK_LIBRARIES ""
LINK_INTERFACE_LIBRARIES ""
LINK_FLAGS "${TPC_LINK_FLAGS}"
COMPILE_DEFINITIONS "XRD_CHUNK_RESP")
COMPILE_DEFINITIONS "${XRD_COMPILE_DEFS}")

#-----------------------------------------------------------------------------
# Install
Expand Down

0 comments on commit 1e44000

Please sign in to comment.