Skip to content

Commit

Permalink
py : build only libraries
Browse files Browse the repository at this point in the history
Conflicts:
	src/XrdCl/CMakeLists.txt
	src/api_test/CMakeLists.txt
  • Loading branch information
adriansev authored and simonmichal committed Jan 22, 2020
1 parent c764993 commit cf7190c
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 5 deletions.
1 change: 1 addition & 0 deletions cmake/XRootDDefaults.cmake
Expand Up @@ -19,4 +19,5 @@ option( ENABLE_TESTS "Enable unit tests."
option( ENABLE_HTTP "Enable HTTP component." TRUE )
option( ENABLE_PYTHON "Enable python bindings." TRUE )
option( XRDCL_ONLY "Build only the client and necessary dependencies" FALSE )
option( XRDCL_LIB_ONLY "Build only the client libraries and necessary dependencies" FALSE )
define_default( XRD_PYTHON_REQ_VERSION 2.4 )
2 changes: 1 addition & 1 deletion packaging/wheel/install.sh
Expand Up @@ -10,7 +10,7 @@ cd xrootdbuild
# set the respective version of python
# replace the default BINDIR with a custom one that can be easily removed afterwards
# (for the python bindings we don't want to install the binaries)
CMAKE_ARGS="-DXRDCL_ONLY=TRUE -DENABLE_PYTHON=TRUE -DCMAKE_INSTALL_PREFIX=$1 -DXRD_PYTHON_REQ_VERSION=$2 -DCMAKE_INSTALL_BINDIR=$startdir/xrootdbuild/bin"
CMAKE_ARGS="-DXRDCL_LIB_ONLY=TRUE -DENABLE_PYTHON=TRUE -DCMAKE_INSTALL_PREFIX=$1 -DXRD_PYTHON_REQ_VERSION=$2 -DCMAKE_INSTALL_BINDIR=$startdir/xrootdbuild/bin"

cmake .. $CMAKE_ARGS

Expand Down
8 changes: 8 additions & 0 deletions src/CMakeLists.txt
Expand Up @@ -2,6 +2,10 @@
#-------------------------------------------------------------------------------
# Include the subcomponents
#-------------------------------------------------------------------------------
if( XRDCL_LIB_ONLY )
set ( XRDCL_ONLY TRUE )
endif()

include( XrdUtils )
include( XrdApps )
include( XrdCrypto )
Expand Down Expand Up @@ -57,6 +61,7 @@ endif()
#-------------------------------------------------------------------------------
# Install the utility scripts
#-------------------------------------------------------------------------------
if( NOT XRDCL_ONLY )
install(
FILES
${CMAKE_SOURCE_DIR}/utils/XrdCmsNotify.pm
Expand All @@ -68,7 +73,9 @@ install(
OWNER_EXECUTE OWNER_WRITE OWNER_READ
GROUP_EXECUTE GROUP_READ
WORLD_EXECUTE WORLD_READ )
endif()

if( NOT XRDCL_LIB_ONLY )
#-------------------------------------------------------------------------------
# Install xrootd-config
#-------------------------------------------------------------------------------
Expand Down Expand Up @@ -102,3 +109,4 @@ install(
COMMAND mv -f \${MANPAGE}.new \${MANPAGE} )
ENDFOREACH()"
)
endif()
22 changes: 18 additions & 4 deletions src/XrdCl/CMakeLists.txt
Expand Up @@ -111,6 +111,7 @@ set_target_properties(
#-------------------------------------------------------------------------------
# xrdfs
#-------------------------------------------------------------------------------
if( NOT XRDCL_LIB_ONLY )
add_executable(
xrdfs
XrdClFS.cc
Expand All @@ -122,10 +123,12 @@ target_link_libraries(
XrdCl
${READLINE_LIBRARY}
${NCURSES_LIBRARY} )
endif()

#-------------------------------------------------------------------------------
# xrdcopy
#-------------------------------------------------------------------------------
if( NOT XRDCL_LIB_ONLY )
add_executable(
xrdcp
XrdClCopy.cc )
Expand All @@ -134,15 +137,23 @@ target_link_libraries(
xrdcp
XrdCl
XrdAppUtils )
endif()

#-------------------------------------------------------------------------------
# Install
#-------------------------------------------------------------------------------
install(
TARGETS XrdCl xrdfs xrdcp
TARGETS XrdCl
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} )

if( NOT XRDCL_LIB_ONLY )
install(
TARGETS xrdfs xrdcp
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} )
endif()

install(
FILES
XrdClAnyObject.hh
Expand Down Expand Up @@ -174,11 +185,12 @@ install(
XrdClOperationHandlers.hh
XrdClArg.hh
XrdClFwd.hh
XrdClParallelOperation.hh
XrdClFileOperations.hh
XrdClFileSystemOperations.hh
XrdClParallelOperation.hh
XrdClFileOperations.hh
XrdClFileSystemOperations.hh
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/xrootd/private/XrdCl )

if( NOT XRDCL_LIB_ONLY )
install(
FILES
${PROJECT_SOURCE_DIR}/docs/man/xrdfs.1
Expand Down Expand Up @@ -213,3 +225,5 @@ install(
WORKING_DIRECTORY \$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_MANDIR}/man1 )
ENDFOREACH()"
)

endif()
11 changes: 11 additions & 0 deletions src/XrdSec.cmake
Expand Up @@ -87,6 +87,7 @@ set_target_properties(
INTERFACE_LINK_LIBRARIES ""
LINK_INTERFACE_LIBRARIES "" )

if( NOT XRDCL_LIB_ONLY )
#-------------------------------------------------------------------------------
# xrdpwdadmin
#-------------------------------------------------------------------------------
Expand All @@ -98,6 +99,7 @@ target_link_libraries(
xrdpwdadmin
XrdCrypto
XrdUtils )
endif()

#-------------------------------------------------------------------------------
# The XrdSecsss module
Expand All @@ -119,6 +121,7 @@ set_target_properties(
INTERFACE_LINK_LIBRARIES ""
LINK_INTERFACE_LIBRARIES "" )

if( NOT XRDCL_LIB_ONLY )
#-------------------------------------------------------------------------------
# xrdsssadmin
#-------------------------------------------------------------------------------
Expand All @@ -129,6 +132,7 @@ add_executable(
target_link_libraries(
xrdsssadmin
XrdUtils )
endif()

#-------------------------------------------------------------------------------
# The XrdSecunix module
Expand All @@ -154,6 +158,12 @@ set_target_properties(
install(
TARGETS
${LIB_XRD_SEC} ${LIB_XRD_SEC_PWD} ${LIB_XRD_SEC_SSS} ${LIB_XRD_SEC_UNIX} ${LIB_XRD_SEC_PROT}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} )

if( NOT XRDCL_LIB_ONLY )
install(
TARGETS
xrdsssadmin xrdpwdadmin
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} )
Expand All @@ -163,3 +173,4 @@ install(
${PROJECT_SOURCE_DIR}/docs/man/xrdsssadmin.8
${PROJECT_SOURCE_DIR}/docs/man/xrdpwdadmin.8
DESTINATION ${CMAKE_INSTALL_MANDIR}/man8 )
endif()
11 changes: 11 additions & 0 deletions src/XrdSecgsi.cmake
Expand Up @@ -65,6 +65,7 @@ set_target_properties(
INTERFACE_LINK_LIBRARIES ""
LINK_INTERFACE_LIBRARIES "" )

if( NOT XRDCL_LIB_ONLY )
#-------------------------------------------------------------------------------
# xrdgsiproxy
#-------------------------------------------------------------------------------
Expand All @@ -90,6 +91,7 @@ target_link_libraries(
XrdCrypto
XrdUtils
${OPENSSL_CRYPTO_LIBRARY} )
endif()

#-------------------------------------------------------------------------------
# Install
Expand All @@ -99,6 +101,12 @@ install(
${LIB_XRD_SEC_GSI}
${LIB_XRD_SEC_GSI_AUTHZVO}
${LIB_XRD_SEC_GSI_GMAPDN}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} )

if( NOT XRDCL_LIB_ONLY )
install(
TARGETS
xrdgsiproxy
xrdgsitest
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
Expand All @@ -109,3 +117,6 @@ install(
${PROJECT_SOURCE_DIR}/docs/man/xrdgsiproxy.1
${PROJECT_SOURCE_DIR}/docs/man/xrdgsitest.1
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 )

endif()

0 comments on commit cf7190c

Please sign in to comment.