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
28 commits
Select commit Hold shift + click to select a range
7158749
CMakeLists.txt: Require C++11 and cmake 3.7
t-b Jan 11, 2020
c46ea53
cppapi/server/tango_config.h: Remove test for gcc >= 3.0
t-b Jan 11, 2020
ce2cdab
Remove HAS_UNIQUE_PTR
t-b Jan 11, 2020
6d494e5
Remove HAS_MAP_AT
t-b Jan 11, 2020
84b98e3
Remove HAS_OVERRIDE
t-b Jan 11, 2020
7483d74
Remove HAS_RVALUE
t-b Jan 11, 2020
fea8ade
Remove HAS_THREAD
t-b Jan 11, 2020
1273f94
Remove HAS_TYPE_TRAITS
t-b Jan 11, 2020
2c88f9c
Remove HAS_LAMBDA_FUNC
t-b Jan 11, 2020
94b3691
cppapi/server/tango_config.h: Map Tango_isnan always to std::isnan
t-b Jan 11, 2020
dd5232a
Prefer nullptr over Tango_nullptr
t-b Jan 11, 2020
ccf6d3b
Remove HAS_RANGE_BASE_FOR
t-b Jan 11, 2020
02b174c
Remove INIT_LIST
t-b Jan 11, 2020
03bccb9
Remove HAS_UNDERLYING
t-b Jan 11, 2020
893c56c
cppapi/server/tango_config.h: Map TANGO_NORETURN always to [[noreturn]]
t-b Jan 11, 2020
2b5f357
cppapi/server/tango_config.h: Remove #ifdef spaghetti used for C++11 …
t-b Jan 11, 2020
1cb8f1b
cppapi/client/ApiUtil.h: Remove unused _KillProc_ class
t-b Jan 20, 2020
69e5138
Travis: Install newer cmake on debian 8
t-b Jan 20, 2020
2858602
.travis: Remove testing for debian wheezy
t-b Jan 20, 2020
5424da3
cppapi/server/idl: Ignore unused-parameter for clang as well
t-b Jan 20, 2020
64dc2a7
cppapi/client/eventconsumer.h: Add missing override keywords
t-b Jan 20, 2020
33910b8
cppapi/server/tango.h: Simplify TANGO_UNUSED handling
t-b Jan 20, 2020
c15e1c4
cmake: Rework C++ compiler feature detection
t-b Jan 20, 2020
a52d8b6
CMakeLists.txt: Unify and add more version output on configuring
t-b Jan 21, 2020
9904f75
appveyor.yml: Remove support for old MSVC versions
t-b Jan 21, 2020
54adedc
Remove conditional code for _MSC_VER < 1900
t-b Jan 21, 2020
435aa9f
log4tango: Remove fallback code for old MSVC versions
t-b Jan 21, 2020
17abaed
cppapi/server/device.cpp: Remove compiler silencing return values
t-b Jan 21, 2020
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
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ env:
- OS_TYPE=debian10 CMAKE_BUILD_TYPE=Release
- OS_TYPE=debian9
- OS_TYPE=debian8 SONAR_SCANNER=ON COVERALLS=ON STOCK_CPPZMQ=OFF
- OS_TYPE=debian7

notifications:
email: false
Expand Down
55 changes: 0 additions & 55 deletions .travis/debian7/Dockerfile

This file was deleted.

8 changes: 6 additions & 2 deletions .travis/debian8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,19 @@ RUN sed -i '/jessie-updates/d' /etc/apt/sources.list # Now archived
RUN apt-get update && apt-get install -y \
apt-utils \
build-essential \
cmake \
curl \
git \
lsb-release \
omniidl \
libomniorb4-dev \
libcos4-dev \
libomnithread3-dev \
libzmq3-dev
libzmq3-dev \
wget

RUN wget --no-check-certificate https://cmake.org/files/v3.10/cmake-3.10.0-Linux-x86_64.sh -O /tmp/cmake-install.sh \
&& chmod +x /tmp/cmake-install.sh \
&& /tmp/cmake-install.sh --skip-license --exclude-subdir

RUN apt-get install -y \
apt-transport-https \
Expand Down
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.7 FATAL_ERROR)

project(cppTango)

set(CXX_STANDARD_REQUIRED 11)

include(CTest)

option(WARNINGS_AS_ERRORS "Treat compiler warnings as errors" OFF)
Expand Down Expand Up @@ -29,7 +31,6 @@ endif()
set(LIBRARY_VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}")
set(SO_VERSION "${MAJOR_VERSION}")

message("System TANGO_HOST=$ENV{TANGO_HOST}")
set(TANGO_HOST $ENV{TANGO_HOST})
include(configure/CMakeLists.txt)

Expand Down
145 changes: 1 addition & 144 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,96 +40,6 @@ environment:
OMNI_BASE: C:\projects\omniORB-4.2.1
PYVER: "py37"
USE_PCH: ON
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
platform: win32
ARCH: win32-msvc9
configuration: Release
CMAKE_GENERATOR: "Visual Studio 9 2008"
MSVCVERSION: v90
MSVCYEAR: "vs2008"
MSVCABR: "9"
VC_VER: 9.0
PYTHONPATH: c:\Python27\
PYTHONPATHOMNI: "/cygdrive/c/Python27/python"
BOOST_ROOT: C:\Libraries\boost_1_63_0
ZMQ_BASE: C:\projects\libzmq
IDL_BASE: C:\projects\tangoidl
IDL_BIN: C:\Program Files (x86)\tangoidl
OMNI_BASE: C:\projects\omniORB-4.2.1
PYVER: "py27"
USE_PCH: ON
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
platform: x64
ARCH: x64-msvc9
configuration: Release
CMAKE_GENERATOR: "Visual Studio 9 2008 Win64"
MSVCVERSION: v90
MSVCYEAR: "vs2008"
MSVCABR: "9"
VC_VER: 9.0
PYTHONPATH: c:\Python27-x64\
PYTHONPATHOMNI: "/cygdrive/c/Python27-x64/python"
BOOST_ROOT: C:\Libraries\boost_1_63_0
ZMQ_BASE: C:\projects\libzmq
IDL_BASE: C:\projects\tangoidl
IDL_BIN: C:\Program Files\tangoidl
OMNI_BASE: C:\projects\omniORB-4.2.1
PYVER: "py27"
USE_PCH: ON
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
platform: win32
ARCH: win32-msvc10
configuration: Release
CMAKE_GENERATOR: "Visual Studio 10 2010"
MSVCVERSION: v100
MSVCYEAR: "vs2010"
MSVCABR: "10"
VC_VER: 10.0
PYTHONPATH: c:\Python33\
PYTHONPATHOMNI: "/cygdrive/c/Python33/python"
BOOST_ROOT: C:\Libraries\boost_1_63_0
ZMQ_BASE: C:\projects\libzmq
IDL_BASE: C:\projects\tangoidl
IDL_BIN: C:\Program Files (x86)\tangoidl
OMNI_BASE: C:\projects\omniORB-4.2.1
PYVER: "py33"
USE_PCH: ON
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
platform: x64
ARCH: x64-msvc10
configuration: Release
CMAKE_GENERATOR: "Visual Studio 10 2010 Win64"
MSVCVERSION: v100
MSVCYEAR: "vs2010"
MSVCABR: "10"
VC_VER: 10.0
PYTHONPATH: c:\Python33-x64\
PYTHONPATHOMNI: "/cygdrive/c/Python33-x64/python"
BOOST_ROOT: C:\Libraries\boost_1_63_0
ZMQ_BASE: C:\projects\libzmq
IDL_BASE: C:\projects\tangoidl
IDL_BIN: C:\Program Files\tangoidl
OMNI_BASE: C:\projects\omniORB-4.2.1
PYVER: "py33"
USE_PCH: ON
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
platform: x64
ARCH: x64-msvc12
configuration: Release
CMAKE_GENERATOR: "Visual Studio 12 2013 Win64"
MSVCVERSION: v120
MSVCYEAR: "vs2013"
MSVCABR: "13"
VC_VER: 13.0
PYTHONPATH: c:\Python33-x64\
PYTHONPATHOMNI: "/cygdrive/c/Python33-x64/python"
BOOST_ROOT: C:\Libraries\boost_1_63_0
ZMQ_BASE: C:\projects\libzmq
IDL_BASE: C:\projects\tangoidl
IDL_BIN: C:\Program Files\tangoidl
OMNI_BASE: C:\projects\omniORB-4.2.1
PYVER: "py33"
USE_PCH: ON
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
platform: x64
ARCH: x64-msvc14
Expand All @@ -148,24 +58,6 @@ environment:
OMNI_BASE: C:\projects\omniORB-4.2.1
PYVER: "py36"
USE_PCH: ON
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
platform: win32
ARCH: win32-msvc12
configuration: Release
CMAKE_GENERATOR: "Visual Studio 12 2013"
MSVCVERSION: v120
MSVCYEAR: "vs2013"
MSVCABR: "13"
VC_VER: 13.0
PYTHONPATH: c:\Python33\
PYTHONPATHOMNI: "/cygdrive/c/Python33/python"
BOOST_ROOT: C:\Libraries\boost_1_63_0
ZMQ_BASE: C:\projects\libzmq
IDL_BASE: C:\projects\tangoidl
IDL_BIN: C:\Program Files (x86)\tangoidl
OMNI_BASE: C:\projects\omniORB-4.2.1
PYVER: "py33"
USE_PCH: ON
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
platform: win32
ARCH: win32-msvc14
Expand Down Expand Up @@ -215,15 +107,8 @@ init:
- cmd: cd "C:\projects\"
- appveyor DownloadFile https://github.com/tango-controls/Pthread_WIN32/releases/download/2.9.1/pthreads-win32-2.9.1_%ARCH%.zip
- cmd: 7z -y x pthreads-win32-2.9.1_%ARCH%.zip -oC:\projects\pthreads-win32\
#VS2008 patch
- cmd: cd "C:\projects\"
- cmd: appveyor DownloadFile https://github.com/menpo/condaci/raw/master/vs2008_patch.zip
- cmd: 7z -y x vs2008_patch.zip -oC:\projects\vs2008_patch\
- cmd: if %ARCH%==x64-msvc9 call C:\projects\vs2008_patch\setup_x64.bat
- cmd: if %ARCH%==x32-msvc9 call C:\projects\vs2008_patch\setup_x86.bat
- cmd: if "%APPVEYOR_BUILD_WORKER_IMAGE%" NEQ "Visual Studio 2017" copy "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars64.bat" "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64\vcvarsamd64.bat"

- cmd: cd "C:\projects\cppTango"

install:
#copy tree for debug build
- cmd: cd c:/projects/
Expand All @@ -233,14 +118,6 @@ install:
- cmd: xcopy "C:/projects/cppTango" "c:/projects/debug_build" /c /g /d /i /e /r /h /y
# Setting Visual Compiler
- cmd: cd "C:\projects\"
- cmd: if %ARCH%==win32-msvc9 call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"
- cmd: if %ARCH%==win32-msvc9 set path=C:\Windows\Microsoft.NET\Framework\v4.0.30319;%path%
- cmd: if %ARCH%==x64-msvc9 call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars64.bat"
- cmd: if %ARCH%==win32-msvc10 call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
- cmd: if %ARCH%==win32-msvc10 set path=C:\Windows\Microsoft.NET\Framework\v4.0.30319;%path%
- cmd: if %ARCH%==x64-msvc10 call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64
- cmd: if %ARCH%==win32-msvc12 call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"
- cmd: if %ARCH%==x64-msvc12 call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x64
- cmd: if %ARCH%==win32-msvc14 call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
- cmd: if %ARCH%==x64-msvc14 call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64
- cmd: if %ARCH%==win32-msvc15 call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat"
Expand All @@ -253,7 +130,6 @@ install:
- cmd: cd "C:\projects\tangoidl"
- cmd: cmake -G "%CMAKE_GENERATOR%" .
- cmd: cmake --build ./ --target install --config Debug
- cmd: if %ARCH%==x64-msvc10 call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 /Release
- cmd: cmake --build ./ --target install --config Release
# Tango API
- cmd: cd "C:\projects\cppTango"
Expand All @@ -279,7 +155,6 @@ build:
build_script:
- cmd: cd C:/projects/cppTango
- cmake --build ./ --config Release
- cmd: if %ARCH%==x64-msvc10 call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64
- cmd: cd c:/projects/debug_build
- cmake --build ./ --config Debug
#- cmake --build ./ --target install --config Debug
Expand All @@ -296,28 +171,10 @@ after_build:
# Generating installer
- cmd: cpack -C Debug -G WIX
- cmd: cpack -C Debug -G ZIP
#rename x64-msvc10
- 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_%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_%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%==win32-msvc12 move libtango_%TANGO_LIB_VER%_v120_x86_debug.msi C:/projects/cppTango
- cmd: if %ARCH%==win32-msvc12 move libtango_%TANGO_LIB_VER%_v120_x86_debug.zip C:/projects/cppTango
- cmd: if %ARCH%==win32-msvc14 move libtango_%TANGO_LIB_VER%_v140_x86_debug.msi C:/projects/cppTango
- cmd: if %ARCH%==win32-msvc14 move libtango_%TANGO_LIB_VER%_v140_x86_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
- cmd: if %ARCH%==win32-msvc15 move libtango_%TANGO_LIB_VER%_v141_x86_debug.msi C:/projects/cppTango
Expand Down
48 changes: 27 additions & 21 deletions configure/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,28 @@ include(FindDoxygen)
include(GNUInstallDirs)

if(NOT CMAKE_BUILD_TYPE)
message("No build type specified - default is Release")
set(CMAKE_BUILD_TYPE Release)
endif()

#assuming build platform == target
set(PLATFORM 32)
if(WIN32)
if(CMAKE_CL_64)
set(PLATFORM 64)
endif(CMAKE_CL_64)
else(WIN32)
if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
set(PLATFORM 64)
endif()
endif(WIN32)

message(STATUS "CMake: version ${CMAKE_VERSION}")
message(STATUS "Target platform: ${CMAKE_SYSTEM_NAME} ${PLATFORM}-bit")
message(STATUS "C++ Compiler: ${CMAKE_CXX_COMPILER_ID} with version ${CMAKE_CXX_COMPILER_VERSION}")
message(STATUS "C Compiler: ${CMAKE_C_COMPILER_ID} with version ${CMAKE_C_COMPILER_VERSION}")
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
message(STATUS "Environment: TANGO_HOST=$ENV{TANGO_HOST}")

if(NOT TANGO_DEVICE_SERVER_PATH)
#TODO windows
set(TANGO_DEVICE_SERVER_PATH ${CMAKE_INSTALL_FULL_BINDIR})
Expand Down Expand Up @@ -174,34 +192,14 @@ if(${FAILED})
message(SEND_ERROR " No omniidl was found! rv=${FAILED}")
endif()

#assuming build platform == target
set(PLATFORM 32)
if(WIN32)
if(CMAKE_CL_64)
set(PLATFORM 64)
endif(CMAKE_CL_64)
else(WIN32)
if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
set(PLATFORM 64)
endif()
endif(WIN32)

if(NOT WIN32)
include(CheckCXXCompilerFlag)
# C++17 and higher support is currently not possible as omniorb uses
# throw specifications and these are not supported anymore.
CHECK_CXX_COMPILER_FLAG("-std=c++14" COMPILER_SUPPORTS_CXX14)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
CHECK_CXX_COMPILER_FLAG("-Og" COMPILER_SUPPORTS_OG)
if(COMPILER_SUPPORTS_CXX14)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
elseif(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
else()
message("The compiler ${CMAKE_CXX_COMPILER} has no C++11/14 support. You may not benefit from performance optimizations.")
endif()

if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
Expand Down Expand Up @@ -229,6 +227,14 @@ if(WARNINGS_AS_ERRORS)
endif()
endif()

if(cxx_relaxed_constexpr IN_LIST CMAKE_CXX_COMPILE_FEATURES)
set(TANGO_CXX_HAS_RELAXED_CONSTEXPR TRUE)
else()
set(TANGO_CXX_HAS_RELAXED_CONSTEXPR FALSE)
endif()

message(STATUS "Check if the compiler supports C++14 relaxed constexpr: ${TANGO_CXX_HAS_RELAXED_CONSTEXPR}")

include(GNUInstallDirs)
include(configure/coveralls.cmake)

Expand Down
2 changes: 1 addition & 1 deletion cpp_test_suite/cpp_test_ds/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

int main(int argc,char *argv[])
{
Tango::Util *tg = Tango_nullptr;
Tango::Util *tg = nullptr;
try
{

Expand Down
Loading