Skip to content
This repository was archived by the owner on Jul 8, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
57c2a1e
start
Ingvord Feb 27, 2018
b68f74d
Progress
Ingvord Feb 27, 2018
3cfe752
Progress
Ingvord Feb 27, 2018
0792b74
Progress
Ingvord Feb 27, 2018
b98f1fe
Progress: looks like it is better to use main component
Ingvord Feb 27, 2018
747322d
Progress
Ingvord Feb 27, 2018
2916e29
Progress
Ingvord Mar 2, 2018
366b85d
Progress
Ingvord Mar 5, 2018
53fd74d
dump version into a file to use by AppVeyor
Ingvord Mar 9, 2018
8d004fc
fix appveyor
Mar 10, 2018
2346b54
fix appveyor
Ingvord Mar 10, 2018
768fe06
Progress #438 add travis deploy
Ingvord Mar 23, 2018
9add0d8
Progress #438 add bintray user and api_key
Ingvord Mar 23, 2018
57a2ce2
Progress #438 override existing packages
Ingvord Mar 23, 2018
b92b16e
Progress #438 enhance package name
Ingvord Mar 23, 2018
cb90c86
Progress #438 install curl
Ingvord Mar 23, 2018
637aa0d
Progress #438 install lsb-release
Ingvord Mar 23, 2018
fa1ccef
Progress #438 minor changes to cmake
Ingvord Mar 26, 2018
6f58408
Progress #438 add conflict info
Ingvord Mar 26, 2018
9b716d4
Progress #438 add conflict info
Ingvord Mar 26, 2018
2f7343a
Progress #438 update conflict info
Ingvord Mar 26, 2018
2f91aeb
Progress #438 update conflict info
Ingvord Mar 26, 2018
c47f039
Progress #438 change packages names
Ingvord Mar 29, 2018
a18f07d
Progress #438 update conflict info
Ingvord Apr 3, 2018
3c37bba
Progress #438 change headers installation folder
Ingvord Apr 3, 2018
b88a137
Merge remote-tracking branch 'origin/tango-9-lts' into cmake-release-…
bourtemb Apr 27, 2018
583d39b
Update RELEASE_NOTES
bourtemb Apr 27, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,18 @@ before_script:
- IPADDR=$(docker inspect -f '{{ .NetworkSettings.IPAddress }}' $CONTAINER)
- TANGO_HOST=${IPADDR}:10000
- docker build --build-arg APP_UID=$(id -u) --build-arg APP_GID=$(id -g) -t cpp_tango .travis/${OS_TYPE}
- docker run --name cpp_tango -e TANGO_HOST=${TANGO_HOST} --link tango_cs:tango_cs -v `pwd`:/home/tango/src -v `pwd`/idl:/home/tango/idl -v `pwd`/cppzmq:/home/tango/cppzmq -dit cpp_tango
- docker run --name cpp_tango -e TANGO_HOST=${TANGO_HOST} -e BINTRAY_USER_NAME=tango-ci -e BINTRAY_API_KEY=${CI_BINTRAY_API_KEY} --link tango_cs:tango_cs -v `pwd`:/home/tango/src -v `pwd`/idl:/home/tango/idl -v `pwd`/cppzmq:/home/tango/cppzmq -dit cpp_tango

script:
- .travis/${OS_TYPE}/run.sh

deploy:
- provider: script
script: bash .travis/deploy.sh
skip_cleanup: true
on:
tags: true

after-script:
- docker stop cpp_tango
- docker rm cpp_tango
Expand Down
2 changes: 2 additions & 0 deletions .travis/debian7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ RUN apt-get install -y procps

RUN apt-get install -y wget

RUN apt-get install -y curl lsb-release

RUN wget --no-check-certificate https://cmake.org/files/v3.10/cmake-3.10.0-Linux-x86_64.sh -O /tmp/cmake-install.sh

RUN chmod +x /tmp/cmake-install.sh
Expand Down
2 changes: 2 additions & 0 deletions .travis/debian8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ RUN apt-get update && apt-get install -y apt-utils

RUN apt-get install -y build-essential cmake

RUN apt-get install -y curl lsb-release

RUN apt-get install -y omniidl libomniorb4-dev libcos4-dev libomnithread3-dev libzmq3-dev

RUN groupadd -g "$APP_GID" tango
Expand Down
2 changes: 2 additions & 0 deletions .travis/debian9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ RUN apt-get update && apt-get install -y apt-utils

RUN apt-get install -y build-essential cmake

RUN apt-get install -y curl lsb-release

RUN apt-get install -y omniidl libomniorb4-dev libcos4-dev libomnithread3-dev libzmq3-dev

RUN groupadd -g "$APP_GID" tango
Expand Down
15 changes: 15 additions & 0 deletions .travis/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

echo "Package libtango"
docker exec cpp_tango make -C /home/tango/src/build package
if [ $? -ne "0" ]
then
exit -1
fi

echo "Deploy libtango"
docker exec cpp_tango make -C /home/tango/src/build deploy
if [ $? -ne "0" ]
then
exit -1
fi
36 changes: 3 additions & 33 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ enable_testing()
#need to define the version of the library
set(MAJOR_VERSION "9")
set(MINOR_VERSION "2")
set(PATCH_VERSION "7")
set(PATCH_VERSION "8")

if(WIN32)
include(configure/cmake_win_defs.cmake)
Expand Down Expand Up @@ -37,39 +37,9 @@ endif(NOT WIN32)

if(WIN32)
include(configure/cmake_win.cmake)
else(WIN32)
add_library(tango SHARED $<TARGET_OBJECTS:log4tango_objects>
$<TARGET_OBJECTS:client_objects>
$<TARGET_OBJECTS:idl_objects>
$<TARGET_OBJECTS:jpeg_objects>
$<TARGET_OBJECTS:jpeg_mmx_objects>
$<TARGET_OBJECTS:server_objects>)
target_link_libraries(tango PUBLIC ${ZMQ_PKG_LIBRARIES} ${OMNIORB_PKG_LIBRARIES} ${OMNICOS_PKG_LIBRARIES} ${OMNIDYN_PKG_LIBRARIES} ${CMAKE_DL_LIBS})
target_compile_options(tango PRIVATE -fPIC)
target_include_directories(tango PUBLIC ${ZMQ_PKG_INCLUDE_DIRS} ${OMNIORB_PKG_INCLUDE_DIRS} ${OMNIDYN_PKG_INCLUDE_DIRS})

target_compile_options(tango PUBLIC ${ZMQ_PKG_CFLAGS_OTHER} ${OMNIORB_PKG_CFLAGS_OTHER} ${OMNICOS_PKG_CFLAGS_OTHER} ${OMNIDYN_PKG_CFLAGS_OTHER})
target_compile_definitions(tango PRIVATE OMNI_UNLOADABLE_STUBS _TANGO_LIB)

set_target_properties(tango PROPERTIES
VERSION ${LIBRARY_VERSION}
SOVERSION ${SO_VERSION})

install(TARGETS tango LIBRARY DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}")
configure_file(tango.pc.cmake tango.pc @ONLY)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/tango.pc"
DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig")
endif(WIN32)


if(WIN32)
include(configure/cpack_win.cmake)
else(WIN32)
set(CPACK_GENERATOR "DEB")
set(CPACK_DEBIAN_PACKAGE_NAME libtango-dev)
set(CPACK_DEBIAN_PACKAGE_VERSION ${LIBRARY_VERSION})
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libcos4-dev, libzmq5-dev | libzmq3-dev")
set(CPACK_DEBIAN_PACKAGE_CONFLICTS "libtango7-dev, libtango8-dev, libtango9-dev")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "TANGO team <tango@esrf.fr>") #required
include(configure/cmake_linux.cmake)
endif(WIN32)

include(CPack)
7 changes: 7 additions & 0 deletions RELEASE_NOTES
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
9.2.8
=====
1. Cmake release targets #438 - Fix appveyor build.
Install include files in <install_prefix>/include/tango directory instead of
<install_prefix>/include.

9.2.7
=====

Expand All @@ -8,3 +14,4 @@
5. remove event subscription sleeps on linux #415
6. Fix bug in event name when pushing an error event to IDL5 clients. #400
7. Tango 9 LTS fix#395 (Inserting const C string in DeviceData) #396
8. tango_config.h: Add clang detection #442
36 changes: 19 additions & 17 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,9 @@ build_script:


after_build:
- cmd: cd C:/projects/cppTango
- cmd: cd C:/projects/cppTango
- cmd: set /p TANGO_LIB_VER=<VERSION
- cmd: echo %TANGO_LIB_VER%
# Generating installer
- cmd: cpack -G WIX
- cmd: cpack -G ZIP
Expand All @@ -213,25 +215,25 @@ after_build:
- cmd: cpack -C Debug -G WIX
- cmd: cpack -C Debug -G ZIP
#rename x64-msvc10
- cmd: if %ARCH%==x64-msvc10 move libtango_9.2.6_Windows7.1SDK_x64_debug.msi libtango_9.2.6_v100_x64_debug.msi
- cmd: if %ARCH%==x64-msvc10 move libtango_9.2.6_Windows7.1SDK_x64_debug.zip libtango_9.2.6_v100_x64_debug.zip
- cmd: if %ARCH%==x64-msvc10 move libtango_%TANGO_LIB_VER%_Windows7.1SDK_x64_debug.msi libtango_%TANGO_LIB_VER%_v100_x64_debug.msi
- cmd: if %ARCH%==x64-msvc10 move libtango_%TANGO_LIB_VER%_Windows7.1SDK_x64_debug.zip libtango_%TANGO_LIB_VER%_v100_x64_debug.zip
- cmd: cd C:/projects/cppTango
- cmd: if %ARCH%==x64-msvc10 move libtango_9.2.6_Windows7.1SDK_x64.msi libtango_9.2.6_v100_x64.msi
- cmd: if %ARCH%==x64-msvc10 move libtango_9.2.6_Windows7.1SDK_x64.zip libtango_9.2.6_v100_x64.zip
- cmd: if %ARCH%==x64-msvc10 move libtango_%TANGO_LIB_VER%_Windows7.1SDK_x64.msi libtango_%TANGO_LIB_VER%_v100_x64.msi
- cmd: if %ARCH%==x64-msvc10 move libtango_%TANGO_LIB_VER%_Windows7.1SDK_x64.zip libtango_%TANGO_LIB_VER%_v100_x64.zip
# copying debug versions for upload
- cmd: cd c:/projects/debug_build
- cmd: if %ARCH%==win32-msvc9 move libtango_9.2.6_v90_x86_debug.msi C:/projects/cppTango
- cmd: if %ARCH%==win32-msvc9 move libtango_9.2.6_v90_x86_debug.zip C:/projects/cppTango
- cmd: if %ARCH%==x64-msvc9 move libtango_9.2.6_v90_x64_debug.msi C:/projects/cppTango
- cmd: if %ARCH%==x64-msvc9 move libtango_9.2.6_v90_x64_debug.zip C:/projects/cppTango
- cmd: if %ARCH%==win32-msvc10 move libtango_9.2.6_v100_x86_debug.msi C:/projects/cppTango
- cmd: if %ARCH%==win32-msvc10 move libtango_9.2.6_v100_x86_debug.zip C:/projects/cppTango
- cmd: if %ARCH%==x64-msvc10 move libtango_9.2.6_v100_x64_debug.msi C:/projects/cppTango
- cmd: if %ARCH%==x64-msvc10 move libtango_9.2.6_v100_x64_debug.zip C:/projects/cppTango
- cmd: if %ARCH%==x64-msvc12 move libtango_9.2.6_v120_x64_debug.msi C:/projects/cppTango
- cmd: if %ARCH%==x64-msvc12 move libtango_9.2.6_v120_x64_debug.zip C:/projects/cppTango
- cmd: if %ARCH%==x64-msvc14 move libtango_9.2.6_v140_x64_debug.msi C:/projects/cppTango
- cmd: if %ARCH%==x64-msvc14 move libtango_9.2.6_v140_x64_debug.zip C:/projects/cppTango
- cmd: if %ARCH%==win32-msvc9 move libtango_%TANGO_LIB_VER%_v90_x86_debug.msi C:/projects/cppTango
- cmd: if %ARCH%==win32-msvc9 move libtango_%TANGO_LIB_VER%_v90_x86_debug.zip C:/projects/cppTango
- cmd: if %ARCH%==x64-msvc9 move libtango_%TANGO_LIB_VER%_v90_x64_debug.msi C:/projects/cppTango
- cmd: if %ARCH%==x64-msvc9 move libtango_%TANGO_LIB_VER%_v90_x64_debug.zip C:/projects/cppTango
- cmd: if %ARCH%==win32-msvc10 move libtango_%TANGO_LIB_VER%_v100_x86_debug.msi C:/projects/cppTango
- cmd: if %ARCH%==win32-msvc10 move libtango_%TANGO_LIB_VER%_v100_x86_debug.zip C:/projects/cppTango
- cmd: if %ARCH%==x64-msvc10 move libtango_%TANGO_LIB_VER%_v100_x64_debug.msi C:/projects/cppTango
- cmd: if %ARCH%==x64-msvc10 move libtango_%TANGO_LIB_VER%_v100_x64_debug.zip C:/projects/cppTango
- cmd: if %ARCH%==x64-msvc12 move libtango_%TANGO_LIB_VER%_v120_x64_debug.msi C:/projects/cppTango
- cmd: if %ARCH%==x64-msvc12 move libtango_%TANGO_LIB_VER%_v120_x64_debug.zip C:/projects/cppTango
- cmd: if %ARCH%==x64-msvc14 move libtango_%TANGO_LIB_VER%_v140_x64_debug.msi C:/projects/cppTango
- cmd: if %ARCH%==x64-msvc14 move libtango_%TANGO_LIB_VER%_v140_x64_debug.zip C:/projects/cppTango


on_finish:
Expand Down
47 changes: 47 additions & 0 deletions configure/cmake_linux.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
project(libtango)



add_library(tango SHARED $<TARGET_OBJECTS:log4tango_objects>
$<TARGET_OBJECTS:client_objects>
$<TARGET_OBJECTS:idl_objects>
$<TARGET_OBJECTS:jpeg_objects>
$<TARGET_OBJECTS:jpeg_mmx_objects>
$<TARGET_OBJECTS:server_objects>)
target_link_libraries(tango PUBLIC ${ZMQ_PKG_LIBRARIES} ${OMNIORB_PKG_LIBRARIES} ${OMNICOS_PKG_LIBRARIES} ${OMNIDYN_PKG_LIBRARIES} ${CMAKE_DL_LIBS})
target_compile_options(tango PRIVATE -fPIC)
target_include_directories(tango PUBLIC ${ZMQ_PKG_INCLUDE_DIRS} ${OMNIORB_PKG_INCLUDE_DIRS} ${OMNIDYN_PKG_INCLUDE_DIRS})

target_compile_options(tango PUBLIC ${ZMQ_PKG_CFLAGS_OTHER} ${OMNIORB_PKG_CFLAGS_OTHER} ${OMNICOS_PKG_CFLAGS_OTHER} ${OMNIDYN_PKG_CFLAGS_OTHER})
target_compile_definitions(tango PRIVATE OMNI_UNLOADABLE_STUBS _TANGO_LIB)

set_target_properties(tango PROPERTIES
VERSION ${LIBRARY_VERSION}
SOVERSION ${SO_VERSION})

install(TARGETS tango LIBRARY DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}")
configure_file(tango.pc.cmake tango.pc @ONLY)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/tango.pc"
DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig")

#CPack
include(configure/cpack_linux.cmake)

find_program(LSB_RELEASE lsb_release)
if(NOT LSB_RELEASE)
message(STATUS "Can not find lsb_release in your path, default to jessie.")
set(LINUX_FLAVOUR jessie)
endif(NOT LSB_RELEASE)
execute_process(COMMAND ${LSB_RELEASE} -cs
OUTPUT_VARIABLE LINUX_FLAVOUR
OUTPUT_STRIP_TRAILING_WHITESPACE)

find_program(CURL curl)
if(CURL)
add_custom_target(deploy
COMMAND ${CURL} -v -T ${CPACK_PACKAGE_FILE_NAME}.deb -u$ENV{BINTRAY_USER_NAME}:$ENV{BINTRAY_API_KEY} \"https://api.bintray.com/content/tango-controls/debian/cppTango/${LIBRARY_VERSION}/pool/main/libt/${LINUX_FLAVOUR}/${CPACK_PACKAGE_FILE_NAME}.deb\;deb_distribution=${LINUX_FLAVOUR}\;deb_component=main\;deb_architecture=${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}\;publish=1\;override=1\"
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
DEPENDS ${PROJECT_BINARY_DIR}/${CPACK_PACKAGE_FILE_NAME}.deb)
elseif(CURL)
message(WARNING "curl was not found deploy won't be possible")
endif(CURL)
3 changes: 3 additions & 0 deletions configure/cmake_win.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ if(CMAKE_CL_64)
add_definitions(-D_64BITS)
endif(CMAKE_CL_64)

#dump version into a file, later used by AppVeyor
file(WRITE ${PROJECT_BINARY_DIR}/VERSION ${LIBRARY_VERSION})

#include and link directories

include_directories(${INCLUDE_OBJECT_MS})
Expand Down
27 changes: 27 additions & 0 deletions configure/cpack_linux.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
find_program(DPKG_CMD dpkg)
execute_process(COMMAND ${DPKG_CMD} --print-architecture
OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE)

set(CPACK_GENERATOR "DEB")
if(CMAKE_BUILD_TYPE STREQUAL "DEBUG")
set(CPACK_PACKAGE_NAME libtango9lts-dbg)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libcos4-dev, libzmq5-dev | libzmq3-dev")
set(CPACK_DEBIAN_PACKAGE_CONFLICTS "libtango7-dev, libtango8-dev, libtango9-dev, libtango-dev, liblog4tango-dev, libtango9lts-dev")
elseif(CMAKE_BUILD_TYPE STREQUAL "RELEASE")
set(CPACK_PACKAGE_NAME libtango9lts-dev)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libcos4, libzmq5 | libzmq3")
set(CPACK_DEBIAN_PACKAGE_CONFLICTS "libtango7-dev, libtango8-dev, libtango9-dev, libtango-dev, liblog4tango-dev, libtango9lts-dbg")
endif(CMAKE_BUILD_TYPE STREQUAL "DEBUG")
set(CPACK_PACKAGE_VERSION "${LIBRARY_VERSION}")
set(CPACK_PACKAGE_VERSION_MAJOR ${MAJOR_VERSION})
set(CPACK_PACKAGE_VERSION_MINOR ${MINOR_VERSION})
set(CPACK_PACKAGE_VERSION_PATCH ${PATCH_VERSION})
set(CPACK_SYSTEM_NAME "${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Tango Controls team <info@tango-controls.org>") #required
set(CPACK_DEBIAN_PACKAGE_DEBUG TRUE)

add_custom_command(OUTPUT ${CPACK_PACKAGE_FILE_NAME}.deb
COMMAND cpack -V)


2 changes: 1 addition & 1 deletion cppapi/client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ else(WIN32)
add_library(client_objects OBJECT ${SOURCES})
target_compile_options(client_objects PRIVATE -fPIC)
endif(WIN32)
install(FILES ${HEADERS} DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
install(FILES ${HEADERS} DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}/tango")
2 changes: 1 addition & 1 deletion cppapi/client/helpers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ set(HELPERS DeviceProxyHelper.h
TangoExceptionsHelper.h
Xstring.h)

install(FILES ${HELPERS} DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
install(FILES ${HELPERS} DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}/tango")
2 changes: 1 addition & 1 deletion cppapi/server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,4 @@ else(WIN32)
target_compile_options(server_objects PRIVATE -fPIC)
endif(WIN32)

install(FILES ${HEADERS} DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
install(FILES ${HEADERS} DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}/tango")
2 changes: 1 addition & 1 deletion cppapi/server/idl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,5 @@ if(WIN32)
else(WIN32)
add_library(idl_objects OBJECT ${SOURCES} tango.h)
target_compile_options(idl_objects PRIVATE -fPIC)
install(FILES tango.h DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}/idl")
install(FILES tango.h DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}/tango/idl")
endif(WIN32)
2 changes: 1 addition & 1 deletion tango.pc.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
prefix = @CMAKE_INSTALL_PREFIX@
exec_prefix = ${prefix}
includedir = ${prefix}/include
includedir = ${prefix}/include/tango
libdir = ${prefix}/@CMAKE_INSTALL_LIBDIR@

Name: @CMAKE_PROJECT_NAME@
Expand Down