Commit 4ad352ed authored by Steven Murray's avatar Steven Murray
Browse files

cmake now builds the remporary executable newrmcd

parent 495bd644
......@@ -339,15 +339,15 @@ ELSE(DEFINED PackageOnly)
set_property (DIRECTORY PROPERTY COMPILE_DEFINITIONS _LARGEFILE64_SOURCE)
################################################################################
##############################################################################
# Rules to install the shared log and spool directories
################################################################################
##############################################################################
CastorInstallDir (/var/log/castor)
CastorInstallDir (/var/log/spool/castor)
################################################################################
##############################################################################
# Include the subdirectories of the project
################################################################################
##############################################################################
# Some directories have client components, and get included unconditionnaly
# inside them, we can filter further down what we need or not.
......
......@@ -24,7 +24,7 @@ cmake_minimum_required (VERSION 2.6)
add_subdirectory (gatewayprotocol)
add_subdirectory (legacymsg)
#add_subdirectory (rmc)
add_subdirectory (rmc)
add_subdirectory (tapebridge)
add_subdirectory (tapegateway)
add_subdirectory (tapeserver)
......
......@@ -22,6 +22,19 @@
#
cmake_minimum_required (VERSION 2.6)
################################################################################
# Rules to build and install rmcd
################################################################################
set (RMCD_SRC_FILES
DlfMessageStrings.cpp
RmcDaemon.cpp
RmcdCmdLine.cpp
RmcdMain.cpp)
add_executable (newrmcd ${RMCD_SRC_FILES})
target_link_libraries (newrmcd castorclient castorcommon)
install (TARGETS newrmcd DESTINATION ${CASTOR_DEST_LIB_DIR})
#CastorInstallExeManPage(newrmcd)
################################################################################
# Rules to build and install castor-tape-acs-mount
################################################################################
......@@ -32,6 +45,7 @@ set (ACS_MOUNT_SRC_FILES
AcsMountCmd.cpp
AcsMountCmdLine.cpp
AcsMountMain.cpp
Cmd.cpp
DebugBuf.cpp)
add_executable (castor-tape-acs-mount ${ACS_MOUNT_SRC_FILES})
set_target_properties (castor-tape-acs-mount PROPERTIES
......@@ -52,6 +66,7 @@ set (ACS_DISMOUNT_SRC_FILES
AcsDismountCmd.cpp
AcsDismountCmdLine.cpp
AcsDismountMain.cpp
Cmd.cpp
DebugBuf.cpp)
add_executable (castor-tape-acs-dismount ${ACS_DISMOUNT_SRC_FILES})
target_link_libraries (castor-tape-acs-dismount castorcommon castortapeutils
......@@ -72,6 +87,7 @@ set (ACS_QUERYVOLUME_SRC_FILES
AcsQueryVolumeCmd.cpp
AcsQueryVolumeCmdLine.cpp
AcsQueryVolumeMain.cpp
Cmd.cpp
DebugBuf.cpp)
add_executable (castor-tape-acs-queryvolume ${ACS_QUERYVOLUME_SRC_FILES})
target_link_libraries (castor-tape-acs-queryvolume castorcommon castortapeutils
......@@ -81,3 +97,17 @@ set_target_properties (castor-tape-acs-queryvolume PROPERTIES
COMPILE_DEFINITIONS LINUX)
install (TARGETS castor-tape-acs-queryvolume DESTINATION ${CASTOR_DEST_LIB_DIR})
CastorInstallExeManPage(castor-tape-acs-queryvolume)
################################################################################
# Rules to build and install castor-tape-mount
################################################################################
set (MOUNT_SRC_FILES
DebugBuf.cpp
Cmd.cpp
MountCmd.cpp
MountCmdLine.cpp
MountMain.cpp)
add_executable (castor-tape-mount ${MOUNT_SRC_FILES})
target_link_libraries (castor-tape-mount castorcommon castorrmc)
install (TARGETS castor-tape-mount DESTINATION ${CASTOR_DEST_LIB_DIR})
CastorInstallExeManPage(castor-tape-mount)
......@@ -23,12 +23,25 @@
cmake_minimum_required (VERSION 2.6)
if (${COMPILE_SERVER} STREQUAL "1")
################################################################################
##############################################################################
# Rules to build and install libcastorrmc.so
################################################################################
set (RMC_LIB_SRC_FILES rmc_dismount.c rmc_errmsg.c rmc_export.c
rmc_find_cartridge.c rmc_get_geometry.c rmc_import.c rmc_mount.c
rmc_read_elem_status.c send2rmc.c)
##############################################################################
set (RMC_LIB_SRC_FILES
rmc_dismount.c
rmc_errmsg.c
rmc_export.c
rmc_find_cartridge.c
rmc_find_char.c
rmc_get_geometry.c
rmc_get_acs_drive_id.c
rmc_get_rmc_host_of_drive.c
rmc_get_loader_type.c
rmc_import.c
rmc_mount.c
rmc_mnt.c
rmc_read_elem_status.c
rmc_unmnt.c
send2rmc.c)
add_library (castorrmc SHARED ${RMC_LIB_SRC_FILES})
CastorSetLibraryVersions (castorrmc)
target_link_libraries (castorrmc castorcommon)
......@@ -50,8 +63,15 @@ if (${COMPILE_SERVER} STREQUAL "1")
##############################################################################
# Rules to build and install rmcd
##############################################################################
set (RMCD_SRC_FILES rmc_serv.c rmc_procreq.c rmc_logit.c rmc_logreq.c
rmc_marshall_element.c rmc_sendrep.c rmc_smcsubr.c rmc_send_scsi_cmd.c)
set (RMCD_SRC_FILES
rmc_serv.c
rmc_procreq.c
rmc_logit.c
rmc_logreq.c
rmc_marshall_element.c
rmc_sendrep.c
rmc_smcsubr.c
rmc_send_scsi_cmd.c)
add_executable (rmcd ${RMCD_SRC_FILES})
# Relax compilation of old code full of pointer casting. Funnily enough,
# the compiler only complains in -O2 mode (RelWithDebInfo in cmake).
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment