Skip to content
Snippets Groups Projects
Commit 4c55a94c authored by Steven Murray's avatar Steven Murray
Browse files

The C file vmgr_oracle_ifce.c generated from the Pro*C file vmgr_oracle_ifce.pc now compiles.

parent 658b99e9
Branches
Tags
No related merge requests found
......@@ -35,7 +35,6 @@ set(CMAKE_DISABLE_SOURCE_CHANGES ON)
set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
include(cmake/CASTORVersion.cmake)
find_package(Oracle)
################################################################################
# Configure header file
......@@ -60,6 +59,50 @@ include_directories(${CMAKE_BINARY_DIR}/h)
include_directories(${CMAKE_SOURCE_DIR})
include_directories(${CMAKE_SOURCE_DIR}/h)
execute_process (COMMAND python ${CMAKE_SOURCE_DIR}/config/oracompile.py
--with-precomp --home OUTPUT_VARIABLE ORACLE_HOME)
string (REGEX REPLACE "\n" "" ORACLE_HOME ${ORACLE_HOME})
message (STATUS "ORACLE_HOME = '${ORACLE_HOME}'")
execute_process (COMMAND python ${CMAKE_SOURCE_DIR}/config/oracompile.py
--with-precomp --bindir OUTPUT_VARIABLE ORACLE_BIN)
string (REGEX REPLACE "\n" "" ORACLE_BIN ${ORACLE_BIN})
message (STATUS "ORACLE_BIN = ${ORACLE_BIN}")
execute_process (COMMAND python ${CMAKE_SOURCE_DIR}/config/oracompile.py
--with-precomp --libdir OUTPUT_VARIABLE ORACLE_LIBDIR)
string (REGEX REPLACE "\n" "" ORACLE_LIBDIR ${ORACLE_LIBDIR})
message (STATUS "ORACLE_LIBDIR = ${ORACLE_LIBDIR}")
execute_process (COMMAND python ${CMAKE_SOURCE_DIR}/config/oracompile.py
--with-precomp --cppflags OUTPUT_VARIABLE ORACLE_CPPFLAGS)
string (REGEX REPLACE "\n" "" ORACLE_CPPFLAGS ${ORACLE_CPPFLAGS})
message (STATUS "ORACLE_CPPFLAGS = ${ORACLE_CPPFLAGS}")
execute_process (COMMAND python ${CMAKE_SOURCE_DIR}/config/oracompile.py
--with-precomp --procinc OUTPUT_VARIABLE ORACLE_PROCINC)
string (REGEX REPLACE "\n" "" ORACLE_PROCINC ${ORACLE_PROCINC})
message (STATUS "ORACLE_PROCINC = ${ORACLE_PROCINC}")
function (CastorAddProC _name)
add_custom_command (
OUTPUT ${_name}.c DEPENDS ${_name}.pc
COMMAND
ORACLE_HOME=${ORACLE_HOME}
LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${ORACLE_LIBDIR}
${ORACLE_BIN}/proc
iname=${CMAKE_CURRENT_SOURCE_DIR}/${_name}
oname=${CMAKE_CURRENT_BINARY_DIR}/${_name}.c
${ORACLE_PROCINC}
include=${CMAKE_SOURCE_DIR}/h threads=yes
char_map=string
parse=full
prefetch=1000)
# Append the oracle specific compilation flags and also use -Wno-error to
# override the default -Werror compilation rule in the case of source files
# produced by the Pro*C precompiler. Such files contain generated code that
# generates warnings.
set_property (SOURCE ${_name}.c
PROPERTY COMPILE_FLAGS "${ORACLE_CPPFLAGS} -Wno-error")
endfunction ()
function (CastorInstallManPage _name _section)
install (FILES ${_name}.man
DESTINATION ${CASTOR_DEST_MAN_DIR}/man${_section}
......
......@@ -22,6 +22,9 @@
#
cmake_minimum_required (VERSION 2.6)
################################################################################
# Rules to build and install libcastorvmgr.so
################################################################################
set (VMGR_LIB_SRC_FILES
vmgr_apiinit.c
vmgr_deletedenmap.c
......@@ -65,9 +68,62 @@ set (VMGR_LIB_SRC_FILES
vmgr_updatetape.c
send2vmgr.c
vmgrcheck.c)
add_library (castorvmgr SHARED ${VMGR_LIB_SRC_FILES})
set_target_properties (castorvmgr
PROPERTIES SOVERSION ${MAJOR_CASTOR_VERSION})
target_link_libraries (castorvmgr castorcommon castorupv)
install (TARGETS castorvmgr DESTINATION ${CASTOR_DEST_LIB_DIR})
CastorInstallLibManPage (vmgr_deletedenmap)
CastorInstallLibManPage (vmgr_deletedgnmap)
CastorInstallLibManPage (vmgr_deletelibrary)
CastorInstallLibManPage (vmgr_deletemodel)
CastorInstallLibManPage (vmgr_deletepool)
CastorInstallLibManPage (vmgr_deletetape)
CastorInstallLibManPage (vmgr_deltag)
CastorInstallLibManPage (vmgr_enterdenmap)
CastorInstallLibManPage (vmgr_enterdenmap_byte_u64)
CastorInstallLibManPage (vmgr_enterdgnmap)
CastorInstallLibManPage (vmgr_enterlibrary)
CastorInstallLibManPage (vmgr_entermodel)
CastorInstallLibManPage (vmgr_enterpool)
CastorInstallLibManPage (vmgr_entertape)
CastorInstallLibManPage (vmgr_gettag)
CastorInstallLibManPage (vmgr_gettape)
CastorInstallLibManPage (vmgr_listdenmap)
CastorInstallLibManPage (vmgr_listdenmap_byte_u64)
CastorInstallLibManPage (vmgr_listdgnmap)
CastorInstallLibManPage (vmgr_listlibrary)
CastorInstallLibManPage (vmgr_listmodel)
CastorInstallLibManPage (vmgr_listpool)
CastorInstallLibManPage (vmgr_listtape)
CastorInstallLibManPage (vmgr_listtape_byte_u64)
CastorInstallLibManPage (vmgr_modifylibrary)
CastorInstallLibManPage (vmgr_modifymodel)
CastorInstallLibManPage (vmgr_modifypool)
CastorInstallLibManPage (vmgr_modifytape)
CastorInstallLibManPage (vmgr_querylibrary)
CastorInstallLibManPage (vmgr_querymodel)
CastorInstallLibManPage (vmgr_querypool)
CastorInstallLibManPage (vmgr_querytape)
CastorInstallLibManPage (vmgr_querytape_byte_u64)
CastorInstallLibManPage (vmgr_reclaim)
CastorInstallLibManPage (vmgr_seterrbuf)
CastorInstallLibManPage (vmgr_settag)
CastorInstallLibManPage (vmgr_tpmounted)
CastorInstallLibManPage (vmgr_updatetape)
################################################################################
# Rules to build and install vmgrd
################################################################################
CastorAddProC(vmgr_oracle_ifce)
set (VMGR_SRC_FILES vmgr_main.c vmgr_oracle_ifce.c vmgr_procreq.c sendrep.c
vmgrlogit.c)
add_executable(vmgrd ${VMGR_SRC_FILES})
target_link_libraries (vmgrd castorcommon castorupv
${ORACLE_LIBDIR}/libclntsh.so)
install (TARGETS vmgrd DESTINATION ${CASTOR_DEST_BIN_DIR})
CastorInstallAdmManPage (vmgrd)
CastorInstallLogrotate (castor-vmgr-server)
CastorInstallSysconfig (vmgrd)
CastorInstallInitScript (vmgrd)
CastorInstallConfigFile (vmgrd)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment