Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial functional version of the third-party-copy library.
Only a minimal proof-of-concept to show we can get COPY intercepted and working.
- Loading branch information
Showing
4 changed files
with
472 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
|
||
cmake_minimum_required( VERSION 2.8 ) | ||
project( xrootd-tpc ) | ||
|
||
set( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake ) | ||
|
||
find_package( Xrootd REQUIRED ) | ||
|
||
macro(use_cxx11) | ||
if (CMAKE_VERSION VERSION_LESS "3.1") | ||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") | ||
set (CMAKE_CXX_FLAGS "-std=gnu++11 ${CMAKE_CXX_FLAGS}") | ||
endif () | ||
else () | ||
set (CMAKE_CXX_STANDARD 11) | ||
endif () | ||
endmacro(use_cxx11) | ||
use_cxx11() | ||
|
||
if( CMAKE_COMPILER_IS_GNUCXX ) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror" ) | ||
endif() | ||
SET( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined") | ||
SET( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined") | ||
|
||
include (FindPkgConfig) | ||
pkg_check_modules(CURL REQUIRED libcurl) | ||
|
||
include_directories(${XROOTD_INCLUDES} ${CURL_INCLUDE_DIRS}) | ||
|
||
add_library(XrdHttpTPC SHARED src/tpc.cpp) | ||
target_link_libraries(XrdHttpTPC -ldl ${XROOTD_UTILS_LIB} ${XROOTD_SERVER_LIB} ${XROOTD_HTTP_LIB} ${CURL_LIBRARIES}) | ||
set_target_properties(XrdHttpTPC PROPERTIES OUTPUT_NAME "XrdHttpTPC-4" SUFFIX ".so" LINK_FLAGS "-Wl,--version-script=${CMAKE_SOURCE_DIR}/configs/export-lib-symbols") | ||
|
||
SET(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Install path for libraries") | ||
|
||
install( | ||
TARGETS XrdHttpTPC | ||
LIBRARY DESTINATION ${LIB_INSTALL_DIR} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
|
||
FIND_PATH(XROOTD_INCLUDES XrdHttp/XrdHttpExtHandler.hh | ||
HINTS | ||
${XROOTD_DIR} | ||
$ENV{XROOTD_DIR} | ||
/usr | ||
/opt/xrootd/ | ||
PATH_SUFFIXES include/xrootd | ||
PATHS /opt/xrootd | ||
) | ||
|
||
FIND_LIBRARY(XROOTD_UTILS_LIB XrdUtils | ||
HINTS | ||
${XROOTD_DIR} | ||
$ENV{XROOTD_DIR} | ||
/usr | ||
/opt/xrootd/ | ||
PATH_SUFFIXES lib | ||
) | ||
|
||
FIND_LIBRARY(XROOTD_SERVER_LIB XrdServer | ||
HINTS | ||
${XROOTD_DIR} | ||
$ENV{XROOTD_DIR} | ||
/usr | ||
/opt/xrootd/ | ||
PATH_SUFFIXES lib | ||
) | ||
|
||
FIND_LIBRARY(XROOTD_HTTP_LIB XrdHttp-4 | ||
HINTS | ||
${XROOTD_DIR} | ||
$ENV{XROOTD_DIR} | ||
/usr | ||
/opt/xrootd/ | ||
PATH_SUFFIXES lib | ||
) | ||
|
||
INCLUDE(FindPackageHandleStandardArgs) | ||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Xrootd DEFAULT_MSG XROOTD_UTILS_LIB XROOTD_HTTP_LIB XROOTD_INCLUDES) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
global: | ||
XrdHttpGetExtHandler*; | ||
|
||
local: | ||
*; | ||
}; |
Oops, something went wrong.