Skip to content
Snippets Groups Projects
Commit 33e820cc authored by Pere Mato Vila's avatar Pere Mato Vila
Browse files

Changed the XROOTD version to 4.2.1 when using 'builtin_xrootd' option. A...

Changed the XROOTD version to 4.2.1 when using 'builtin_xrootd' option. A number of warnings had to be silenced.
parent bcb09661
Branches
Tags
No related merge requests found
......@@ -594,13 +594,18 @@ if(xrootd)
endif()
endif()
if(builtin_xrootd)
set(xrootd_version 3.3.6)
set(xrootd_versionnum 300030006)
set(xrootd_version 4.2.1)
set(xrootd_versionnum 400020001)
message(STATUS "Downloading and building XROOTD version ${xrootd_version}")
string(REPLACE "-Wall " "" __cxxflags "${CMAKE_CXX_FLAGS}") # Otherwise it produces many warnings
string(REPLACE "-W " "" __cxxflags "${__cxxflags}") # Otherwise it produces many warnings
ROOT_ADD_CXX_FLAG(__cxxflags -Wno-duplicate-decl-specifier)
ROOT_ADD_CXX_FLAG(__cxxflags -Wno-deprecated-declarations)
ROOT_ADD_CXX_FLAG(__cxxflags -Wno-conditional-uninitialized)
ROOT_ADD_CXX_FLAG(__cxxflags -Wno-unused-result)
ROOT_ADD_CXX_FLAG(__cxxflags -Wno-sometimes-uninitialized)
ROOT_ADD_CXX_FLAG(__cxxflags -Wno-pointer-bool-conversion)
ROOT_ADD_CXX_FLAG(__cxxflags -Wno-format-security)
ExternalProject_Add(
XROOTD
URL http://xrootd.org/download/v${xrootd_version}/xrootd-${xrootd_version}.tar.gz
......@@ -622,10 +627,14 @@ if(builtin_xrootd)
endif()
endif()
set(XROOTD_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/include/xrootd ${CMAKE_BINARY_DIR}/include/xrootd/private)
set(XROOTD_LIBRARIES ${CMAKE_BINARY_DIR}/${_LIBDIR_DEFAULT}/libXrdMain${CMAKE_SHARED_LIBRARY_SUFFIX}
${CMAKE_BINARY_DIR}/${_LIBDIR_DEFAULT}/libXrdUtils${CMAKE_SHARED_LIBRARY_SUFFIX}
set(XROOTD_LIBRARIES ${CMAKE_BINARY_DIR}/${_LIBDIR_DEFAULT}/libXrdUtils${CMAKE_SHARED_LIBRARY_SUFFIX}
${CMAKE_BINARY_DIR}/${_LIBDIR_DEFAULT}/libXrdClient${CMAKE_SHARED_LIBRARY_SUFFIX}
${CMAKE_BINARY_DIR}/${_LIBDIR_DEFAULT}/libXrdCl${CMAKE_SHARED_LIBRARY_SUFFIX})
if(xrootd_version VERSION_LESS 4)
list(APPEND XROOTD_LIBRARIES ${CMAKE_BINARY_DIR}/${_LIBDIR_DEFAULT}/libXrdMain${CMAKE_SHARED_LIBRARY_SUFFIX})
else()
set(XROOTD_NOMAIN TRUE)
endif()
set(XROOTD_CFLAGS "-DROOTXRDVERS=${xrootd_versionnum}")
install(DIRECTORY ${CMAKE_BINARY_DIR}/${_LIBDIR_DEFAULT}/ DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT libraries
......
......@@ -9,6 +9,7 @@ ROOT_USE_PACKAGE(net/auth)
include_directories(${XROOTD_INCLUDE_DIRS})
add_definitions(${XROOTD_CFLAGS})
ROOT_ADD_CXX_FLAG(CMAKE_CXX_FLAGS -Wno-undefined-bool-conversion)
if(WIN32)
ROOT_LINKER_LIBRARY(XrdProofd XProofProtUtils.cxx LIBRARIES ${XROOTD_LIBRARIES})
......@@ -25,11 +26,15 @@ else()
endif()
if(builtin_xrootd)
add_dependencies(XrdProofd XROOTD)
if(NOT TARGET XROOTDLIBS)
add_custom_command(OUTPUT ${XROOTD_LIBRARIES} DEPENDS XROOTD)
add_custom_target(XROOTDLIBS DEPENDS ${XROOTD_LIBRARIES})
endif()
add_dependencies(XrdProofd XROOTDLIBS)
if (NOT XROOTD_NOMAIN)
add_dependencies(xproofd XROOTD)
add_dependencies(xproofd XROOTDLIBS)
endif ()
add_dependencies(proofd XROOTD)
add_dependencies(proofd XROOTDLIBS)
endif()
ROOT_INSTALL_HEADERS()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment