Commit fb190ad9 authored by Holger Witsch's avatar Holger Witsch
Browse files

compiles and links

parent 7bbb2714
Pipeline #62753 failed with stages
in 8 minutes and 59 seconds
#=============================================================================
#
# file : CMakeLists.txt
#
# description : File to generate a TANGO device server using cmake.
#
# project : VacGaugeServer
#
#=============================================================================
# This file is generated by POGO
# (Program Obviously used to Generate tango Object)
#=============================================================================
#
#
cmake_minimum_required (VERSION 2.8...3.21)
set(CMAKE_SKIP_RPATH true)
#
# Project definitions
#
project(VacGaugeServer)
#
# optional compiler flags
#
#~ set(CXXFLAGS_USER -g)
#
# global information
#
set(EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/bin")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH})
set(TANGO_HOME ../../_build_env)
set(OMNI_HOME ${TANGO_HOME})
#
# Compiler and linker flags
#
set(C++11_FLAGS "-std=c++0x")
set(CMAKE_CXX_FLAGS "${CXXFLAGS_USER} ${CMAKE_CXX_FLAGS} ${C++11_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}")
#
# Tango Class as git submodules
#
set(RELDIR ..)
# TANGO_HOME is our conda build env home
set(TANGO_INCLUDES ${TANGO_HOME}/include/tango ${TANGO_HOME}/include ${OMNI_HOME}/include)
set(TANGO_LIB_HOME ${TANGO_HOME}/lib ${OMNI_HOME}/lib)
set(TANGO_LIBS tango COS4 omniORB4 omniDynamic4 omnithread zmq dl pthread)
# linking directly on ub2004 the cmake uses :
# "/segfs/tango/cppserver/protocols/SerialLine/src"
# "/segfs/tango/cppserver/protocols/WindowProtocol/src"
#
# Files for Serial TANGO class
#
#------------ Inheritance from Serial class ------------
#~ set(SERIAL_PATH ${RELDIR}/serial/classes/Serial/src)
#~ set(SERIAL_INCLUDE ${RELDIR}/serial/classes/Serial/include)
set(SERIAL_PATH /segfs/tango/cppserver/protocols/SerialLine/src)
set(SERIAL_INCLUDE ${SERIAL_PATH})
set(SERIAL_SRC ${SERIAL_PATH}/Serial.cpp ${SERIAL_PATH}/SerialClass.cpp ${SERIAL_PATH}/SerialStateMachine.cpp)
set(WINDOWPROTOCOL WindowProtocol)
#~ set(WINDOWPROTOCOL_PATH ${RELDIR}/WindowProtocol/src)
#~ set(WINDOWPROTOCOL_INCLUDE ${WINDOWPROTOCOL_PATH} ${SERIAL_INCLUDE} ${WINDOWPROTOCOL_PATH} ${SERIAL_INCLUDE})
set(WINDOWPROTOCOL_PATH /segfs/tango/cppserver/protocols/WindowProtocol/src)
set(WINDOWPROTOCOL_INCLUDE ${WINDOWPROTOCOL_PATH} ${SERIAL_INCLUDE})
set(WINDOWPROTOCOL_SRC ${SERIAL_SRC} ${WINDOWPROTOCOL_PATH}/${WINDOWPROTOCOL}.cpp ${WINDOWPROTOCOL_PATH}/${WINDOWPROTOCOL}Class.cpp ${WINDOWPROTOCOL_PATH}/${WINDOWPROTOCOL}StateMachine.cpp)
#~ #
#~ # Files for Serial TANGO class
#~ #
#~ set(SERIAL Serial)
#~ set(SERIAL_PATH ${RELDIR}/serial/classes/Serial/src)
#~ set(SERIAL_INCLUDE ${RELDIR}/serial/classes/Serial/include)
#~ set(SERIAL_SRC ${SERIAL_PATH}/${SERIAL}.cpp ${SERIAL_PATH}/${SERIAL}Class.cpp ${SERIAL_PATH}/${SERIAL}StateMachine.cpp)
#
# Files for DigitelMPC TANGO class
#
set(DIGITELMPC DigitelMPC)
set(DIGITELMPC_PATH ${RELDIR}/DigitelMPC)
set(DIGITELMPC_INCLUDE ${RELDIR}/DigitelMPC)
set(DIGITELMPC_SRC ${DIGITELMPC_PATH}/${DIGITELMPC}.cpp ${DIGITELMPC_PATH}/${DIGITELMPC}Class.cpp ${DIGITELMPC_PATH}/${DIGITELMPC}StateMachine.cpp)
#
# Files for Agilent4uhvCtrl TANGO class
#
set(AGILENT4UHVCTRL Agilent4uhvCtrl)
set(AGILENT4UHVCTRL_PATH ${RELDIR}/Agilent4uhvCtrl/src)
set(AGILENT4UHVCTRL_INCLUDE ${RELDIR}/Agilent4uhvCtrl/src)
set(AGILENT4UHVCTRL_SRC ${AGILENT4UHVCTRL_PATH}/${AGILENT4UHVCTRL}.cpp ${AGILENT4UHVCTRL_PATH}/${AGILENT4UHVCTRL}Class.cpp ${AGILENT4UHVCTRL_PATH}/${AGILENT4UHVCTRL}StateMachine.cpp ${AGILENT4UHVCTRL_PATH}/AgilentRefreshThread.cpp)
#
# Files for VarianDualCtrl TANGO class
#
set(VARIANDUALCTRL VarianDualCtrl)
set(VARIANDUALCTRL_PATH ${RELDIR}/VarianDualCtrl)
set(VARIANDUALCTRL_INCLUDE ${RELDIR}/VarianDualCtrl)
set(VARIANDUALCTRL_SRC ${VARIANDUALCTRL_PATH}/${VARIANDUALCTRL}.cpp ${VARIANDUALCTRL_PATH}/${VARIANDUALCTRL}Class.cpp ${VARIANDUALCTRL_PATH}/${VARIANDUALCTRL}StateMachine.cpp ${VARIANDUALCTRL_PATH}/VarianRefreshThread.cpp)
#
# Files for VarianDualIP TANGO class
#
set(VARIANDUALIP VarianDualIP)
set(VARIANDUALIP_PATH ${RELDIR}/VarianDualIP)
set(VARIANDUALIP_INCLUDE ${RELDIR}/VarianDualIP)
set(VARIANDUALIP_SRC ${VARIANDUALIP_PATH}/${VARIANDUALIP}.cpp ${VARIANDUALIP_PATH}/${VARIANDUALIP}Class.cpp ${VARIANDUALIP_PATH}/${VARIANDUALIP}StateMachine.cpp)
#
# Files for BalzersTpg300 TANGO class
#
set(BALZERSTPG300 BalzersTpg300)
set(BALZERSTPG300_PATH ${RELDIR}/BalzersTpg300)
set(BALZERSTPG300_INCLUDE ${RELDIR}/BalzersTpg300)
set(BALZERSTPG300_SRC ${BALZERSTPG300_PATH}/${BALZERSTPG300}.cpp ${BALZERSTPG300_PATH}/${BALZERSTPG300}Class.cpp ${BALZERSTPG300_PATH}/${BALZERSTPG300}StateMachine.cpp ${BALZERSTPG300_PATH}/RefreshThread.cpp)
#
# Files for BalzersGauge TANGO class
#
#------------ Inheritance from PressureGauge class ------------
set(PRESSUREGAUGE_CLASS PressureGauge)
set(PRESSUREGAUGE_PATH ${RELDIR}/PressureGauge)
set(PRESSUREGAUGE_INCLUDE ${PRESSUREGAUGE_PATH})
set(PRESSUREGAUGE_SRC ${PRESSUREGAUGE_PATH}/PressureGauge.cpp ${PRESSUREGAUGE_PATH}/PressureGaugeClass.cpp ${PRESSUREGAUGE_PATH}/PressureGaugeStateMachine.cpp)
set(BALZERSGAUGE BalzersGauge)
set(BALZERSGAUGE_PATH ${RELDIR}/BalzersGauge)
set(BALZERSGAUGE_INCLUDE ${PRESSUREGAUGE_INCLUDE} ${RELDIR}/BalzersGauge)
set(BALZERSGAUGE_SRC ${PRESSUREGAUGE_SRC} ${BALZERSGAUGE_PATH}/${BALZERSGAUGE}.cpp ${BALZERSGAUGE_PATH}/${BALZERSGAUGE}Class.cpp ${BALZERSGAUGE_PATH}/${BALZERSGAUGE}StateMachine.cpp)
#
# Files for VacGauge TANGO class
#
set(VACGAUGE VacGauge)
set(VACGAUGE_PATH ${RELDIR}/${VACGAUGE})
set(VACGAUGE_INCLUDE ${VACGAUGE_PATH})
set(VACGAUGE_SRC ${VACGAUGE_PATH}/${VACGAUGE}.cpp
${VACGAUGE_PATH}/${VACGAUGE}Class.cpp
${VACGAUGE_PATH}/${VACGAUGE}StateMachine.cpp
${VACGAUGE_PATH}/${VACGAUGE}DynAttrUtils.cpp
${VACGAUGE_PATH}/histo_buffer.cpp
${VACGAUGE_PATH}/TangoGauge.cpp
${VACGAUGE_PATH}/AdditionalMethods.cpp
${VACGAUGE_PATH}/RdpAlgorithm.cpp)
set(VACGAUGESERVER_PATH ${RELDIR}/VacGaugeServer)
#
# User additional include, link folders/libraries and source files
#
set(USER_INCL_DIR )
set(USER_LIB_DIR )
set(USER_LIBS )
set(USER_SRC_FILES )
#
# Set gloabal info and include directories
#
set(ALL_CLASS_INCLUDE ${SERIAL_INCLUDE} ${WINDOWPROTOCOL_INCLUDE} ${SERIAL_INCLUDE} ${DIGITELMPC_INCLUDE} ${AGILENT4UHVCTRL_INCLUDE} ${VARIANDUALCTRL_INCLUDE} ${VARIANDUALIP_INCLUDE} ${BALZERSTPG300_INCLUDE} ${BALZERSGAUGE_INCLUDE} ${VACGAUGE_INCLUDE} )
set(SERVER_SRC ${SERIAL_SRC} ${WINDOWPROTOCOL_SRC} ${DIGITELMPC_SRC} ${AGILENT4UHVCTRL_SRC} ${VARIANDUALCTRL_SRC} ${VARIANDUALIP_SRC} ${BALZERSTPG300_SRC} ${BALZERSGAUGE_SRC} ${VACGAUGE_SRC} ${USER_SRC_FILES} ${VACGAUGESERVER_PATH}/MultiClassesFactory.cpp ${VACGAUGESERVER_PATH}/main.cpp)
include_directories(${ALL_CLASS_INCLUDE} ${USER_INCL_DIR} ${TANGO_INCLUDES})
#
# Device Server generation
#
set(SERVER_NAME VacGaugeServer)
#
# Set library directories
#
link_directories(${USER_LIB_DIR} ${TANGO_LIB_HOME})
#
# Compile and link
#
message("SERVER_NAME=${SERVER_NAME}")
message("SERVER_SRC=${SERVER_SRC}")
add_executable(${SERVER_NAME} ${SERVER_SRC})
target_link_libraries(${SERVER_NAME} ${USER_LIBS} ${TANGO_LIBS})
......@@ -20,7 +20,7 @@ set(CMAKE_SKIP_RPATH true)
#
project(VacGaugeServer)
set(RELDIR ..)
set(RELDIR .)
#
# Files for Serial TANGO class
......@@ -28,9 +28,7 @@ set(RELDIR ..)
#------------ Inheritance from Serial class ------------
set(SERIAL_PATH ${RELDIR}/serial/classes/Serial/src)
set(SERIAL_INCLUDE ${RELDIR}/serial/classes/Serial/include)
#~ set(SERIAL_PATH ${RELDIR}/serial/src)
#~ set(SERIAL_INCLUDE ${SERIAL_PATH})
set(SERIAL_SRC ${SERIAL_PATH}/Serial.cpp ${SERIAL_PATH}/SerialClass.cpp ${SERIAL_PATH}/SerialStateMachine.cpp)
set(SERIAL_SRC ${SERIAL_PATH}/Serial.cpp ${SERIAL_PATH}/SerialLinux.cpp ${SERIAL_PATH}/SerialClass.cpp ${SERIAL_PATH}/SerialStateMachine.cpp)
#
# Files for WindowProtocol TANGO class
......@@ -39,7 +37,7 @@ set(SERIAL_SRC ${SERIAL_PATH}/Serial.cpp ${SERIAL_PATH}/SerialClass.cpp ${SERIAL
set(WINDOWPROTOCOL WindowProtocol)
set(WINDOWPROTOCOL_PATH ${RELDIR}/WindowProtocol/src)
set(WINDOWPROTOCOL_INCLUDE ${SERIAL_INCLUDE} ${RELDIR}/WindowProtocol/src)
set(WINDOWPROTOCOL_SRC ${SERIAL_SRC} ${WINDOWPROTOCOL_PATH}/${WINDOWPROTOCOL}.cpp ${WINDOWPROTOCOL_PATH}/${WINDOWPROTOCOL}Class.cpp ${WINDOWPROTOCOL_PATH}/${WINDOWPROTOCOL}StateMachine.cpp)
set(WINDOWPROTOCOL_SRC ${WINDOWPROTOCOL_PATH}/${WINDOWPROTOCOL}.cpp ${WINDOWPROTOCOL_PATH}/${WINDOWPROTOCOL}Class.cpp ${WINDOWPROTOCOL_PATH}/${WINDOWPROTOCOL}StateMachine.cpp)
#
# Files for DigitelMPC TANGO class
#
......@@ -82,11 +80,16 @@ set(BALZERSTPG300_SRC ${BALZERSTPG300_PATH}/${BALZERSTPG300}.cpp ${BALZERSTPG30
set(PRESSUREGAUGE_CLASS PressureGauge)
set(PRESSUREGAUGE_PATH ${RELDIR}/PressureGauge)
set(PRESSUREGAUGE_INCLUDE PressureGauge)
set(PRESSUREGAUGE_SRC ${PRESSUREGAUGE_PATH}/PressureGauge.cpp ${PRESSUREGAUGE_PATH}/PressureGaugeClass.cpp ${PRESSUREGAUGE_PATH}/PressureGaugeStateMachine.cpp)
set(PRESSUREGAUGE_SRC ${PRESSUREGAUGE_PATH}/PressureGauge.cpp
${PRESSUREGAUGE_PATH}/PressureGaugeClass.cpp
${PRESSUREGAUGE_PATH}/PressureGaugeStateMachine.cpp)
set(BALZERSGAUGE BalzersGauge)
set(BALZERSGAUGE_PATH BalzersGauge)
set(BALZERSGAUGE_INCLUDE ${PRESSUREGAUGE_INCLUDE} BalzersGauge)
set(BALZERSGAUGE_SRC ${PRESSUREGAUGE_SRC} ${BALZERSGAUGE_PATH}/${BALZERSGAUGE}.cpp ${BALZERSGAUGE_PATH}/${BALZERSGAUGE}Class.cpp ${BALZERSGAUGE_PATH}/${BALZERSGAUGE}StateMachine.cpp)
set(BALZERSGAUGE_SRC ${PRESSUREGAUGE_SRC}
${BALZERSGAUGE_PATH}/${BALZERSGAUGE}.cpp
${BALZERSGAUGE_PATH}/${BALZERSGAUGE}Class.cpp
${BALZERSGAUGE_PATH}/${BALZERSGAUGE}StateMachine.cpp)
#
# Files for VacGauge TANGO class
#
......@@ -127,10 +130,15 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}")
#
# Set gloabal info and include directories
#
set(ALL_CLASS_INCLUDE ${WINDOWPROTOCOL_INCLUDE} ${SERIAL_INCLUDE} ${DIGITELMPC_INCLUDE} ${AGILENT4UHVCTRL_INCLUDE} ${VARIANDUALCTRL_INCLUDE} ${VARIANDUALIP_INCLUDE} ${BALZERSTPG300_INCLUDE} ${BALZERSGAUGE_INCLUDE} ${VACGAUGE_INCLUDE} )
set(SERVER_SRC ${WINDOWPROTOCOL_SRC} ${SERIAL_SRC} ${DIGITELMPC_SRC} ${AGILENT4UHVCTRL_SRC} ${VARIANDUALCTRL_SRC} ${VARIANDUALIP_SRC} ${BALZERSTPG300_SRC} ${BALZERSGAUGE_SRC} ${VACGAUGE_SRC} ${USER_SRC_FILES}
${VACGAUGE_PATH}/main.cpp
)
# ${SERIAL_INCLUDE} is contained in ${WINDOWPROTOCOL_INCLUDE}
set(ALL_CLASS_INCLUDE ${WINDOWPROTOCOL_INCLUDE}
${DIGITELMPC_INCLUDE} ${AGILENT4UHVCTRL_INCLUDE}
${VARIANDUALCTRL_INCLUDE} ${VARIANDUALIP_INCLUDE}
${BALZERSTPG300_INCLUDE} ${BALZERSGAUGE_INCLUDE} ${VACGAUGE_INCLUDE} )
set(SERVER_SRC ${WINDOWPROTOCOL_SRC} ${SERIAL_SRC}
${DIGITELMPC_SRC} ${AGILENT4UHVCTRL_SRC} ${VARIANDUALCTRL_SRC}
${VARIANDUALIP_SRC} ${BALZERSTPG300_SRC} ${BALZERSGAUGE_SRC}
${VACGAUGE_SRC} ${USER_SRC_FILES} ${VACGAUGE_PATH}/main.cpp)
include_directories(${ALL_CLASS_INCLUDE} ${USER_INCL_DIR} ${TANGO_INCLUDES})
#
......@@ -143,6 +151,7 @@ set(SERVER_NAME VacGaugeServer)
#
message("SERVER_NAME=${SERVER_NAME}")
message("SERVER_SRC=${SERVER_SRC}")
message("ALL_CLASS_INCLUDE=${ALL_CLASS_INCLUDE}")
add_executable(${SERVER_NAME} ${SERVER_SRC})
target_link_libraries(${SERVER_NAME} ${USER_LIBS} ${TANGO_LIBS})
#!/bin/bash -xu # this is not used !!!!
# build.sh for VacGaugeServer
#~ git clone git@gitlab.esrf.fr:accelerators/cicd/generic/protocols/serial.git
#~ # from above project subclasses are cloned:
#~ # bash clone-classes.bash
#~ # but to avoid typing the password as many times:
#~ git clone git@gitlab.esrf.fr:accelerators/Vacuum/VacGaugeServerProject/VacGauge.git
cp ${RECIPE_DIR}/CMakeLists.txt ${SRC_DIR}
#~ for project in PressureGauge BalzersGauge BalzersTpg300 VarianDualCtrl VarianDualIP Agilent4uhvCtrl WindowProtocol DigitelMPC; do
#~ if [ ! -d ${project} ]; then
#~ git clone git@gitlab.esrf.fr:accelerators/Vacuum/VacGaugeServerProject/$project.git
#~ fi
#~ done
mkdir build 2>/dev/null
cd build
#~ cd VacGaugeServer
cmake ..
#~ cp ${RECIPE_DIR}/CMakeLists.txt ${SRC_DIR}
#~ cp ${RECIPE_DIR}/CMakeLists-original.cmake CMakeLists.txt
#~ mkdir build 2>/dev/null
#~ cd build
#~ cmake ..
#~ make
make
# all the above was the attempt to build the server within a conda build
# environment. That failed.
#this build expects to find the executable, made on ub2004-devel, as this
EXE="/segfs/tango/release/ubuntu2004/bin/VacGaugeServer"
EXE="VacGaugeServer"
if [ -x "${EXE}" ]; then
mkdir ${PREFIX}/bin >&/dev/null
# copy the executable into the bin directory
cp -p ${EXE} ${PREFIX}/bin/vacgaugeserver
cp -p ${EXE} ${PREFIX}/bin
else
echo "Aaaargh, no executable!"
exit 1
......
# this repo (the one in source) only exists to make all the needed
# other repos submodules. This allows to have the sole git_url keywork
# repos submodules. This allows to have the sole git_url keyword
# download all the needed files.
# This however means, that we can't extract the version number of the
# VacGaugeServer repo. So let's fix it for the time being, that ACU need
......@@ -26,14 +26,9 @@ package:
number: {{ number }}
numpy: 1.16
# After many hours wanting to contain the cmake in the build env and failing
# we'll forget cmake make the executable in the /segfs/tango ecosystem by
# hand (on ub2004-devel).
# We'll just pack it from there.
#~ source:
#~ - git_url: git@gitlab.esrf.fr:holger.witsch/vacgaugeserver-conda-package.git
source:
- git_url: git@gitlab.esrf.fr:holger.witsch/vacgaugeserver-conda-package.git
#~ - git_url: git@gitlab.esrf.fr:accelerators/Vacuum/VacGaugeServerProject/VacGaugeServer.git
#~ git_depth: 1 # (Defaults to -1/not shallow)
build:
arch: linux64
......@@ -42,12 +37,12 @@ build:
requirements:
build:
#~ - cpptango
#~ - omniorb
#~ - cppzmq
#~ - zeromq
#~ - {{ compiler('cxx') }} =9.3
#~ - cmake =3.16
- cpptango
- omniorb
- cppzmq
- zeromq
- {{ compiler('cxx') }}
- cmake
run:
- cpptango
- omniorb
......
Markdown is supported
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