Skip to content

Commit

Permalink
Release 2024-06-25
Browse files Browse the repository at this point in the history
  • Loading branch information
arobenko committed Jun 24, 2024
2 parents f4cfd3c + f21c1e3 commit abcf5c0
Show file tree
Hide file tree
Showing 1,258 changed files with 1,443 additions and 1,436 deletions.
52 changes: 0 additions & 52 deletions .appveyor.yml

This file was deleted.

105 changes: 103 additions & 2 deletions .github/workflows/actions_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: Github Actions Build
on: [push]

env:
COMMS_BRANCH: v5.2.2
COMMSDSL_BRANCH: v6.3
COMMS_BRANCH: v5.2.5
COMMSDSL_BRANCH: v6.3.3

jobs:

Expand Down Expand Up @@ -355,3 +355,104 @@ jobs:
run: cmake --build . --config ${{matrix.type}} --target install
env:
VERBOSE: 1

build_msvc_2019:
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
type: [Debug, Release, MinSizeRel]
arch: [Win32, x64]
cpp: [11, 14, 17]

steps:
- uses: actions/checkout@v4

- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build

- name: Install Boost
shell: cmd
run: |
choco install boost-msvc-14.2
- name: Prepare externals
shell: cmd
run: |
%GITHUB_WORKSPACE%\script\prepare_externals.bat
env:
BUILD_DIR: ${{runner.workspace}}/build
PLATFORM: ${{matrix.arch}}
EXTERNALS_DIR: ${{runner.workspace}}/externals
COMMON_INSTALL_DIR: ${{runner.workspace}}/build/install
COMMON_BUILD_TYPE: ${{matrix.type}}
COMMON_CXX_STANDARD: ${{matrix.cpp}}
COMMS_TAG: ${{env.COMMS_TAG}}
COMMSDSL_TAG: ${{env.COMMSDSL_TAG}}
COMMSDSL_PLATFORM: 'x64'

- name: Configure CMake
shell: cmd
working-directory: ${{runner.workspace}}/build
run: |
cmake %GITHUB_WORKSPACE% -A ${{matrix.arch}} -DCMAKE_BUILD_TYPE=${{matrix.type}} -DCMAKE_INSTALL_PREFIX=install ^
-DCMAKE_PREFIX_PATH="${{runner.workspace}}/build/install" -DBoost_USE_STATIC_LIBS=ON ^
-DCMAKE_CXX_STANDARD=${{matrix.cpp}} -DOPT_FORCE_EXTRA_BOOST_LIBS=ON
- name: Build Target
working-directory: ${{runner.workspace}}/build
shell: cmd
run: cmake --build . --config ${{matrix.type}} --target install
env:
VERBOSE: 1

build_msvc_2022:
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
type: [Debug, Release, MinSizeRel]
arch: [x64]
cpp: [11, 14, 17, 20]

steps:
- uses: actions/checkout@v4

- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build

- name: Install Boost
if: matrix.arch == 'x64'
shell: cmd
run: |
choco install boost-msvc-14.3
- name: Prepare externals
shell: cmd
run: |
%GITHUB_WORKSPACE%\script\prepare_externals.bat
env:
BUILD_DIR: ${{runner.workspace}}/build
PLATFORM: ${{matrix.arch}}
EXTERNALS_DIR: ${{runner.workspace}}/externals
COMMON_INSTALL_DIR: ${{runner.workspace}}/build/install
COMMON_BUILD_TYPE: ${{matrix.type}}
COMMON_CXX_STANDARD: ${{matrix.cpp}}
COMMS_TAG: ${{env.COMMS_TAG}}
COMMSDSL_TAG: ${{env.COMMSDSL_TAG}}
COMMSDSL_PLATFORM: 'x64'

- name: Configure CMake
shell: cmd
working-directory: ${{runner.workspace}}/build
run: |
cmake %GITHUB_WORKSPACE% -A ${{matrix.arch}} -DCMAKE_BUILD_TYPE=${{matrix.type}} -DCMAKE_INSTALL_PREFIX=install ^
-DCMAKE_PREFIX_PATH="${{runner.workspace}}/build/install" -DBoost_USE_STATIC_LIBS=ON ^
-DCMAKE_CXX_STANDARD=${{matrix.cpp}} -DOPT_FORCE_EXTRA_BOOST_LIBS=ON
- name: Build Target
working-directory: ${{runner.workspace}}/build
shell: cmd
run: cmake --build . --config ${{matrix.type}} --target install
env:
VERBOSE: 1
64 changes: 28 additions & 36 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
cmake_minimum_required (VERSION 3.1)
project ("cc_tutorial")

option (WARN_AS_ERR "Treat warnings as error" ON)
option (UNIX_USE_CCACHE "Treat warnings as error" ON)
option (FORCE_EXTRA_BOOST_LIBS "Force linking to extra boost libraries" OFF)
option (USE_SANITIZERS "Compile with sanitizers." OFF)
option (OPT_WARN_AS_ERR "Treat warnings as error" ON)
option (OPT_USE_CCACHE "Use ccache" OFF)
option (OPT_FORCE_EXTRA_BOOST_LIBS "Force linking to extra boost libraries" OFF)
option (OPT_USE_SANITIZERS "Compile with sanitizers." OFF)

# Extra configuration variables
# OPT_CCACHE_EXECUTABLE - Custom ccache executable

#####################################################

set (CMAKE_CXX_STANDARD 11 CACHE STRING "The C++ standard to use")
set (MIN_COMMSDSL_VERSION "6.3")
set (MIN_COMMSDSL_VERSION "6.3.3")

include(GNUInstallDirs)

find_package(Boost REQUIRED COMPONENTS system)

if (FORCE_EXTRA_BOOST_LIBS)
if (OPT_FORCE_EXTRA_BOOST_LIBS)
set (EXTRA_BOOST_TARGETS Boost::date_time Boost::regex)
find_package(Boost COMPONENTS REQUIRED date_time regex)
endif ()
Expand All @@ -34,29 +39,24 @@ set (COMMON_CLIENT_LIB "common_client")

set (cc_compile_file ${LibComms_DIR}/CC_Compile.cmake)
if (EXISTS ${cc_compile_file})
set (warn_as_err_opt)
if (WARN_AS_ERR)
set (warn_as_err_opt WARN_AS_ERR)
set (extra_opts)
if (OPT_WARN_AS_ERR)
list (APPEND extra_opts WARN_AS_ERR)
endif()

set (ccache_opt)
if (UNIX_USE_CCACHE)
set (ccache_opt USE_CCACHE)
if (OPT_USE_CCACHE)
list (APPEND extra_opts USE_CCACHE)
if (NOT "${OPT_CCACHE_EXECUTABLE}" STREQUAL "")
list (APPEND extra_opts CCACHE_EXECTUABLE "${OPT_CCACHE_EXECUTABLE}")
endif ()
endif ()

include (${cc_compile_file})
cc_compile(${warn_as_err_opt} ${ccache_opt})
endif ()
if (OPT_USE_SANITIZERS)
list (APPEND extra_opts DEFAULT_SANITIZERS)
endif ()

set (CC_TUTORIAL_SANITIZER_OPTS)
if (USE_SANITIZERS AND (NOT ${CMAKE_VERSION} VERSION_LESS "3.13") AND
((CMAKE_COMPILER_IS_GNUCC) OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")))
set (CC_TUTORIAL_SANITIZER_OPTS
-fno-omit-frame-pointer
-fno-sanitize-recover=address
-fsanitize=address
-fno-sanitize-recover=undefined
-fsanitize=undefined)
include (${cc_compile_file})
cc_compile(${extra_opts})
endif ()

#######################################################
Expand Down Expand Up @@ -117,7 +117,7 @@ function (bin_server type name)
target_link_libraries(
${bin_name} PRIVATE ${COMMON_SERVER_LIB} cc::comms Boost::system Boost::boost ${CMAKE_THREAD_LIBS_INIT})

if (FORCE_EXTRA_BOOST_LIBS)
if (OPT_FORCE_EXTRA_BOOST_LIBS)
target_link_libraries(
${bin_name} PRIVATE ${EXTRA_BOOST_TARGETS})
endif ()
Expand All @@ -133,19 +133,11 @@ function (bin_server type name)
${bin_name} PRIVATE ${PROJECT_SOURCE_DIR}/${type}/${name}/include)

target_compile_options(${bin_name} PRIVATE
$<$<CXX_COMPILER_ID:GNU>:-Wno-old-style-cast -Wno-string-conversion ${CC_TUTORIAL_SANITIZER_OPTS}>
$<$<CXX_COMPILER_ID:Clang>:-Wno-old-style-cast -Wno-string-conversion ${CC_TUTORIAL_SANITIZER_OPTS}>
$<$<CXX_COMPILER_ID:GNU>:-Wno-old-style-cast -Wno-string-conversion>
$<$<CXX_COMPILER_ID:Clang>:-Wno-old-style-cast -Wno-string-conversion>
$<$<CXX_COMPILER_ID:MSVC>:-D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS>
)


if (NOT "${CC_TUTORIAL_SANITIZER_OPTS}" STREQUAL "")
target_link_options(${bin_name} PRIVATE
$<$<CXX_COMPILER_ID:GNU>:${CC_TUTORIAL_SANITIZER_OPTS}>
$<$<CXX_COMPILER_ID:Clang>:${CC_TUTORIAL_SANITIZER_OPTS}>
)
endif ()

install(TARGETS ${bin_name}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
Expand All @@ -159,7 +151,7 @@ function (bin_client type name)
target_link_libraries(
${bin_name} PRIVATE ${COMMON_CLIENT_LIB} cc::comms Boost::system Boost::boost ${CMAKE_THREAD_LIBS_INIT})

if (FORCE_EXTRA_BOOST_LIBS)
if (OPT_FORCE_EXTRA_BOOST_LIBS)
target_link_libraries(
${bin_name} PRIVATE ${EXTRA_BOOST_TARGETS})
endif ()
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ mentioned available parameters, which can be used in addition to standard
ones provided by CMake itself, to modify the default build.

This project also has external dependencies, it requires an access to
the [COMMS Library](https://github.com/commschamp/commsdsl) and
the [COMMS Library](https://github.com/commschamp/comms) and
code generators from [commsdsl](https://github.com/commschamp/commsdsl) projects.
These dependencies are expected to be built independenty and access to them provided
via standard **CMAKE_PREFIX_PATH** and/or **CMAKE_PROGRAM_PATH** (for the binaries of
Expand Down
2 changes: 1 addition & 1 deletion howtos/howto1/include/howto1/Interface.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v6.3.0
// Generated by commsdsl2comms v6.3.3

/// @file
/// @brief Contains definition of <b>"Interface"</b> interface class.
Expand Down
2 changes: 1 addition & 1 deletion howtos/howto1/include/howto1/InterfaceCommon.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v6.3.0
// Generated by commsdsl2comms v6.3.3

/// @file
/// @brief Contains common template parameters independent functionality of
Expand Down
2 changes: 1 addition & 1 deletion howtos/howto1/include/howto1/MsgId.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v6.3.0
// Generated by commsdsl2comms v6.3.3

/// @file
/// @brief Contains definition of message ids enumeration.
Expand Down
4 changes: 2 additions & 2 deletions howtos/howto1/include/howto1/Version.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v6.3.0
// Generated by commsdsl2comms v6.3.3

/// @file
/// @brief Contains protocol version definition.
Expand All @@ -22,5 +22,5 @@ inline constexpr unsigned specVersion()
} // namespace howto1

// Generated compile time check for minimal supported version of the COMMS library
static_assert(COMMS_MAKE_VERSION(5, 2, 2) <= comms::version(),
static_assert(COMMS_MAKE_VERSION(5, 2, 5) <= comms::version(),
"The version of COMMS library is too old");
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v6.3.0
// Generated by commsdsl2comms v6.3.3

/// @file
/// @brief Contains dispatch to handling function(s) for client input input messages.
Expand Down
2 changes: 1 addition & 1 deletion howtos/howto1/include/howto1/dispatch/DispatchMessage.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v6.3.0
// Generated by commsdsl2comms v6.3.3

/// @file
/// @brief Contains dispatch to handling function(s) for all input messages.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v6.3.0
// Generated by commsdsl2comms v6.3.3

/// @file
/// @brief Contains dispatch to handling function(s) for client input input messages.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v6.3.0
// Generated by commsdsl2comms v6.3.3

/// @file
/// @brief Contains message factory with dynamic memory allocation for all the messages.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v6.3.0
// Generated by commsdsl2comms v6.3.3

/// @file
/// @brief Contains message factory with dynamic memory allocation for the client input messages.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v6.3.0
// Generated by commsdsl2comms v6.3.3

/// @file
/// @brief Contains message factory with dynamic memory allocation for the server input messages.
Expand Down
2 changes: 1 addition & 1 deletion howtos/howto1/include/howto1/field/FieldBase.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v6.3.0
// Generated by commsdsl2comms v6.3.3

/// @file
/// @brief Contains definition of base class of all the fields.
Expand Down
2 changes: 1 addition & 1 deletion howtos/howto1/include/howto1/field/InterfaceFlags.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v6.3.0
// Generated by commsdsl2comms v6.3.3

/// @file
/// @brief Contains definition of <b>"InterfaceFlags"</b> field.
Expand Down
2 changes: 1 addition & 1 deletion howtos/howto1/include/howto1/field/InterfaceFlagsCommon.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v6.3.0
// Generated by commsdsl2comms v6.3.3

/// @file
/// @brief Contains common template parameters independent functionality of
Expand Down
2 changes: 1 addition & 1 deletion howtos/howto1/include/howto1/field/MsgId.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v6.3.0
// Generated by commsdsl2comms v6.3.3

/// @file
/// @brief Contains definition of <b>"MsgId"</b> field.
Expand Down
2 changes: 1 addition & 1 deletion howtos/howto1/include/howto1/field/MsgIdCommon.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v6.3.0
// Generated by commsdsl2comms v6.3.3

/// @file
/// @brief Contains common template parameters independent functionality of
Expand Down
2 changes: 1 addition & 1 deletion howtos/howto1/include/howto1/frame/Frame.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v6.3.0
// Generated by commsdsl2comms v6.3.3

/// @file
/// @brief Contains definition of <b>"Frame"</b> frame class.
Expand Down
Loading

0 comments on commit abcf5c0

Please sign in to comment.