Skip to content

Commit

Permalink
build: add 'plugins' phony target
Browse files Browse the repository at this point in the history
Motivation:

Commands like 'xrdcp' and 'xrdfs' require plugins to provide some
functionality, perhaps most prominently when authenticating.  However,
the list of required plugins and the names of these plugin's targets
changes over time.

It would be convenient if the build system were to automate building a
useful subset of plugins (perhaps all plugins) by using a constant
(phony) target 'plugins'.  This would facilitate creating build-tree
binaries with a command like:

    make plugins xrdcp xrdfs

Modification:

Add support for 'plugins' phony target to which plugins may add
themselves.

Add initial support for this 'plugins' target that builds XrdCryptossl,
XrdSecpwd, XrdSecsss, XrdSecunix, XrdSecgsi, XrdSecgsiGMAPDN and
XrdSecgsiAUTHZVO, and any dependencies thereof.

Result:

Is is easier to build functional client applications that run from
within the build-tree.
  • Loading branch information
paulmillar committed Jan 5, 2021
1 parent b6ed338 commit 7cc2faa
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CMakeLists.txt
Expand Up @@ -13,6 +13,15 @@ if(NOT (CMAKE_VERSION VERSION_LESS "3.1"))
cmake_policy(SET CMP0054 OLD)
endif()


#-------------------------------------------------------------------------------
# A 'plugins' phony target to simplify building build-tree binaries.
# Plugins are responsible for adding themselves to this target, where
# appropriate.
#-------------------------------------------------------------------------------
ADD_CUSTOM_TARGET(plugins)


include( XRootDUtils )
CheckBuildDirectory()

Expand Down
1 change: 1 addition & 0 deletions src/XrdCrypto.cmake
Expand Up @@ -4,6 +4,7 @@ include( XRootDCommon )
# Modules
#-------------------------------------------------------------------------------
set( LIB_XRD_CRYPTOSSL XrdCryptossl-${PLUGIN_VERSION} )
add_dependencies(plugins ${LIB_XRD_CRYPTOSSL})

#-------------------------------------------------------------------------------
# Shared library version
Expand Down
6 changes: 6 additions & 0 deletions src/XrdSec.cmake
Expand Up @@ -10,6 +10,12 @@ set( LIB_XRD_SEC_PWD XrdSecpwd-${PLUGIN_VERSION} )
set( LIB_XRD_SEC_SSS XrdSecsss-${PLUGIN_VERSION} )
set( LIB_XRD_SEC_UNIX XrdSecunix-${PLUGIN_VERSION} )

add_dependencies(plugins ${LIB_XRD_SEC}
${LIB_XRD_SEC_PROT}
${LIB_XRD_SEC_PWD}
${LIB_XRD_SEC_SSS}
${LIB_XRD_SEC_UNIX})

#-------------------------------------------------------------------------------
# The XrdSec module
#-------------------------------------------------------------------------------
Expand Down
4 changes: 4 additions & 0 deletions src/XrdSecgsi.cmake
Expand Up @@ -8,6 +8,10 @@ set( LIB_XRD_SEC_GSI XrdSecgsi-${PLUGIN_VERSION} )
set( LIB_XRD_SEC_GSI_GMAPDN XrdSecgsiGMAPDN-${PLUGIN_VERSION} )
set( LIB_XRD_SEC_GSI_AUTHZVO XrdSecgsiAUTHZVO-${PLUGIN_VERSION} )

add_dependencies(plugins ${LIB_XRD_SEC_GSI}
${LIB_XRD_SEC_GSI_GMAPDN}
${LIB_XRD_SEC_GSI_AUTHZVO})

#-------------------------------------------------------------------------------
# The XrdSecgsi library
#-------------------------------------------------------------------------------
Expand Down

0 comments on commit 7cc2faa

Please sign in to comment.