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

Added GFAL to CMake builds

parent a539877a
No related branches found
No related tags found
No related merge requests found
# - Locate GFAL library
# Defines:
#
# GFAL_FOUND
# GFAL_INCLUDE_DIR
# GFAL_INCLUDE_DIRS (not cached)
# GFAL_LIBRARIES
find_path(GFAL_INCLUDE_DIR NAMES gfal_api.h HINTS ${GFAL_DIR}/include $ENV{GFAL_DIR}/inlcude)
find_library(GFAL_LIBRARIES NAMES gfal HINTS ${GFAL_DIR}/lib $ENV{GFAL_DIR}/lib)
find_path(SRM_IFCE_INCLUDE_DIR gfal_srm_ifce_types.h HINTS ${SRM_IFCE_DIR}/include $ENV{SRM_IFCE_DIR}/include)
set(GFAL_INCLUDE_DIRS ${GFAL_INCLUDE_DIR} ${SRM_IFCE_INCLUDE_DIR})
# handle the QUIETLY and REQUIRED arguments and set GFAL_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GFAL DEFAULT_MSG GFAL_INCLUDE_DIR SRM_IFCE_INCLUDE_DIR GFAL_LIBRARIES)
mark_as_advanced(GFAL_FOUND GFAL_INCLUDE_DIR GFAL_LIBRARIES SRM_IFCE_INCLUDE_DIR)
...@@ -630,8 +630,25 @@ if(cling) ...@@ -630,8 +630,25 @@ if(cling)
add_dependencies(CLING LLVM) add_dependencies(CLING LLVM)
endif() endif()
#---Check for gfal-------------------------------------------------------------------
if(gfal)
find_package(GFAL)
if(NOT GFAL_FOUND)
if(fail-on-missing)
message(FATAL_ERROR "Gfal library not found and is required (gfal option enabled)")
else()
message(STATUS "GFAL library not found. Set variable GFAL_DIR to point to your gfal installation
and the variable SRM_IFCE_DIR to the srm_ifce installation")
message(STATUS "For the time being switching OFF 'gfal' option")
set(gfal OFF CACHE BOOL "" FORCE)
endif()
endif()
endif()
#---Report non implemented options--------------------------------------------------- #---Report non implemented options---------------------------------------------------
foreach(opt afs chirp clarens dcache gfal glite globus hdfs lzma pch peac sapdb srp) foreach(opt afs chirp clarens cling dcache glite globus hdfs lzma pch peac sapdb srp)
if(${opt}) if(${opt})
message(STATUS ">>> Option '${opt}' not implemented yet! Signal your urgency to pere.mato@cern.ch") message(STATUS ">>> Option '${opt}' not implemented yet! Signal your urgency to pere.mato@cern.ch")
set(${opt} OFF CACHE BOOL "" FORCE) set(${opt} OFF CACHE BOOL "" FORCE)
......
...@@ -10,4 +10,7 @@ endif() ...@@ -10,4 +10,7 @@ endif()
if(rfio) if(rfio)
add_subdirectory(rfio) add_subdirectory(rfio)
endif() endif()
if(gfal)
add_subdirectory(gfal)
endif()
############################################################################
# CMakeLists.txt file for building ROOT io/gfal package
############################################################################
ROOT_USE_PACKAGE(io/io)
ROOT_USE_PACKAGE(net/net)
include_directories(${GFAL_INCLUDE_DIRS})
add_definitions(-D_FILE_OFFSET_BITS=64)
ROOT_GENERATE_DICTIONARY(G__GFAL *.h LINKDEF LinkDef.h)
ROOT_GENERATE_ROOTMAP(GFAL LINKDEF LinkDef.h DEPENDENCIES Net RIO)
ROOT_LINKER_LIBRARY(GFAL *.cxx G__GFAL.cxx LIBRARIES Core ${GFAL_LIBRARIES} DEPENDENCIES Net RIO)
ROOT_INSTALL_HEADERS()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment