Skip to content

Commit abcf5c0

Browse files
committed
Release 2024-06-25
2 parents f4cfd3c + f21c1e3 commit abcf5c0

File tree

1,258 files changed

+1443
-1436
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,258 files changed

+1443
-1436
lines changed

.appveyor.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.

.github/workflows/actions_build.yml

Lines changed: 103 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ name: Github Actions Build
33
on: [push]
44

55
env:
6-
COMMS_BRANCH: v5.2.2
7-
COMMSDSL_BRANCH: v6.3
6+
COMMS_BRANCH: v5.2.5
7+
COMMSDSL_BRANCH: v6.3.3
88

99
jobs:
1010

@@ -355,3 +355,104 @@ jobs:
355355
run: cmake --build . --config ${{matrix.type}} --target install
356356
env:
357357
VERBOSE: 1
358+
359+
build_msvc_2019:
360+
runs-on: windows-2019
361+
strategy:
362+
fail-fast: false
363+
matrix:
364+
type: [Debug, Release, MinSizeRel]
365+
arch: [Win32, x64]
366+
cpp: [11, 14, 17]
367+
368+
steps:
369+
- uses: actions/checkout@v4
370+
371+
- name: Create Build Environment
372+
run: cmake -E make_directory ${{runner.workspace}}/build
373+
374+
- name: Install Boost
375+
shell: cmd
376+
run: |
377+
choco install boost-msvc-14.2
378+
379+
- name: Prepare externals
380+
shell: cmd
381+
run: |
382+
%GITHUB_WORKSPACE%\script\prepare_externals.bat
383+
env:
384+
BUILD_DIR: ${{runner.workspace}}/build
385+
PLATFORM: ${{matrix.arch}}
386+
EXTERNALS_DIR: ${{runner.workspace}}/externals
387+
COMMON_INSTALL_DIR: ${{runner.workspace}}/build/install
388+
COMMON_BUILD_TYPE: ${{matrix.type}}
389+
COMMON_CXX_STANDARD: ${{matrix.cpp}}
390+
COMMS_TAG: ${{env.COMMS_TAG}}
391+
COMMSDSL_TAG: ${{env.COMMSDSL_TAG}}
392+
COMMSDSL_PLATFORM: 'x64'
393+
394+
- name: Configure CMake
395+
shell: cmd
396+
working-directory: ${{runner.workspace}}/build
397+
run: |
398+
cmake %GITHUB_WORKSPACE% -A ${{matrix.arch}} -DCMAKE_BUILD_TYPE=${{matrix.type}} -DCMAKE_INSTALL_PREFIX=install ^
399+
-DCMAKE_PREFIX_PATH="${{runner.workspace}}/build/install" -DBoost_USE_STATIC_LIBS=ON ^
400+
-DCMAKE_CXX_STANDARD=${{matrix.cpp}} -DOPT_FORCE_EXTRA_BOOST_LIBS=ON
401+
402+
- name: Build Target
403+
working-directory: ${{runner.workspace}}/build
404+
shell: cmd
405+
run: cmake --build . --config ${{matrix.type}} --target install
406+
env:
407+
VERBOSE: 1
408+
409+
build_msvc_2022:
410+
runs-on: windows-2022
411+
strategy:
412+
fail-fast: false
413+
matrix:
414+
type: [Debug, Release, MinSizeRel]
415+
arch: [x64]
416+
cpp: [11, 14, 17, 20]
417+
418+
steps:
419+
- uses: actions/checkout@v4
420+
421+
- name: Create Build Environment
422+
run: cmake -E make_directory ${{runner.workspace}}/build
423+
424+
- name: Install Boost
425+
if: matrix.arch == 'x64'
426+
shell: cmd
427+
run: |
428+
choco install boost-msvc-14.3
429+
430+
- name: Prepare externals
431+
shell: cmd
432+
run: |
433+
%GITHUB_WORKSPACE%\script\prepare_externals.bat
434+
env:
435+
BUILD_DIR: ${{runner.workspace}}/build
436+
PLATFORM: ${{matrix.arch}}
437+
EXTERNALS_DIR: ${{runner.workspace}}/externals
438+
COMMON_INSTALL_DIR: ${{runner.workspace}}/build/install
439+
COMMON_BUILD_TYPE: ${{matrix.type}}
440+
COMMON_CXX_STANDARD: ${{matrix.cpp}}
441+
COMMS_TAG: ${{env.COMMS_TAG}}
442+
COMMSDSL_TAG: ${{env.COMMSDSL_TAG}}
443+
COMMSDSL_PLATFORM: 'x64'
444+
445+
- name: Configure CMake
446+
shell: cmd
447+
working-directory: ${{runner.workspace}}/build
448+
run: |
449+
cmake %GITHUB_WORKSPACE% -A ${{matrix.arch}} -DCMAKE_BUILD_TYPE=${{matrix.type}} -DCMAKE_INSTALL_PREFIX=install ^
450+
-DCMAKE_PREFIX_PATH="${{runner.workspace}}/build/install" -DBoost_USE_STATIC_LIBS=ON ^
451+
-DCMAKE_CXX_STANDARD=${{matrix.cpp}} -DOPT_FORCE_EXTRA_BOOST_LIBS=ON
452+
453+
- name: Build Target
454+
working-directory: ${{runner.workspace}}/build
455+
shell: cmd
456+
run: cmake --build . --config ${{matrix.type}} --target install
457+
env:
458+
VERBOSE: 1

CMakeLists.txt

Lines changed: 28 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
11
cmake_minimum_required (VERSION 3.1)
22
project ("cc_tutorial")
33

4-
option (WARN_AS_ERR "Treat warnings as error" ON)
5-
option (UNIX_USE_CCACHE "Treat warnings as error" ON)
6-
option (FORCE_EXTRA_BOOST_LIBS "Force linking to extra boost libraries" OFF)
7-
option (USE_SANITIZERS "Compile with sanitizers." OFF)
4+
option (OPT_WARN_AS_ERR "Treat warnings as error" ON)
5+
option (OPT_USE_CCACHE "Use ccache" OFF)
6+
option (OPT_FORCE_EXTRA_BOOST_LIBS "Force linking to extra boost libraries" OFF)
7+
option (OPT_USE_SANITIZERS "Compile with sanitizers." OFF)
8+
9+
# Extra configuration variables
10+
# OPT_CCACHE_EXECUTABLE - Custom ccache executable
11+
12+
#####################################################
813

914
set (CMAKE_CXX_STANDARD 11 CACHE STRING "The C++ standard to use")
10-
set (MIN_COMMSDSL_VERSION "6.3")
15+
set (MIN_COMMSDSL_VERSION "6.3.3")
1116

1217
include(GNUInstallDirs)
1318

1419
find_package(Boost REQUIRED COMPONENTS system)
1520

16-
if (FORCE_EXTRA_BOOST_LIBS)
21+
if (OPT_FORCE_EXTRA_BOOST_LIBS)
1722
set (EXTRA_BOOST_TARGETS Boost::date_time Boost::regex)
1823
find_package(Boost COMPONENTS REQUIRED date_time regex)
1924
endif ()
@@ -34,29 +39,24 @@ set (COMMON_CLIENT_LIB "common_client")
3439

3540
set (cc_compile_file ${LibComms_DIR}/CC_Compile.cmake)
3641
if (EXISTS ${cc_compile_file})
37-
set (warn_as_err_opt)
38-
if (WARN_AS_ERR)
39-
set (warn_as_err_opt WARN_AS_ERR)
42+
set (extra_opts)
43+
if (OPT_WARN_AS_ERR)
44+
list (APPEND extra_opts WARN_AS_ERR)
4045
endif()
4146

42-
set (ccache_opt)
43-
if (UNIX_USE_CCACHE)
44-
set (ccache_opt USE_CCACHE)
47+
if (OPT_USE_CCACHE)
48+
list (APPEND extra_opts USE_CCACHE)
49+
if (NOT "${OPT_CCACHE_EXECUTABLE}" STREQUAL "")
50+
list (APPEND extra_opts CCACHE_EXECTUABLE "${OPT_CCACHE_EXECUTABLE}")
51+
endif ()
4552
endif ()
4653

47-
include (${cc_compile_file})
48-
cc_compile(${warn_as_err_opt} ${ccache_opt})
49-
endif ()
54+
if (OPT_USE_SANITIZERS)
55+
list (APPEND extra_opts DEFAULT_SANITIZERS)
56+
endif ()
5057

51-
set (CC_TUTORIAL_SANITIZER_OPTS)
52-
if (USE_SANITIZERS AND (NOT ${CMAKE_VERSION} VERSION_LESS "3.13") AND
53-
((CMAKE_COMPILER_IS_GNUCC) OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")))
54-
set (CC_TUTORIAL_SANITIZER_OPTS
55-
-fno-omit-frame-pointer
56-
-fno-sanitize-recover=address
57-
-fsanitize=address
58-
-fno-sanitize-recover=undefined
59-
-fsanitize=undefined)
58+
include (${cc_compile_file})
59+
cc_compile(${extra_opts})
6060
endif ()
6161

6262
#######################################################
@@ -117,7 +117,7 @@ function (bin_server type name)
117117
target_link_libraries(
118118
${bin_name} PRIVATE ${COMMON_SERVER_LIB} cc::comms Boost::system Boost::boost ${CMAKE_THREAD_LIBS_INIT})
119119

120-
if (FORCE_EXTRA_BOOST_LIBS)
120+
if (OPT_FORCE_EXTRA_BOOST_LIBS)
121121
target_link_libraries(
122122
${bin_name} PRIVATE ${EXTRA_BOOST_TARGETS})
123123
endif ()
@@ -133,19 +133,11 @@ function (bin_server type name)
133133
${bin_name} PRIVATE ${PROJECT_SOURCE_DIR}/${type}/${name}/include)
134134

135135
target_compile_options(${bin_name} PRIVATE
136-
$<$<CXX_COMPILER_ID:GNU>:-Wno-old-style-cast -Wno-string-conversion ${CC_TUTORIAL_SANITIZER_OPTS}>
137-
$<$<CXX_COMPILER_ID:Clang>:-Wno-old-style-cast -Wno-string-conversion ${CC_TUTORIAL_SANITIZER_OPTS}>
136+
$<$<CXX_COMPILER_ID:GNU>:-Wno-old-style-cast -Wno-string-conversion>
137+
$<$<CXX_COMPILER_ID:Clang>:-Wno-old-style-cast -Wno-string-conversion>
138138
$<$<CXX_COMPILER_ID:MSVC>:-D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS>
139139
)
140140

141-
142-
if (NOT "${CC_TUTORIAL_SANITIZER_OPTS}" STREQUAL "")
143-
target_link_options(${bin_name} PRIVATE
144-
$<$<CXX_COMPILER_ID:GNU>:${CC_TUTORIAL_SANITIZER_OPTS}>
145-
$<$<CXX_COMPILER_ID:Clang>:${CC_TUTORIAL_SANITIZER_OPTS}>
146-
)
147-
endif ()
148-
149141
install(TARGETS ${bin_name}
150142
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
151143
)
@@ -159,7 +151,7 @@ function (bin_client type name)
159151
target_link_libraries(
160152
${bin_name} PRIVATE ${COMMON_CLIENT_LIB} cc::comms Boost::system Boost::boost ${CMAKE_THREAD_LIBS_INIT})
161153

162-
if (FORCE_EXTRA_BOOST_LIBS)
154+
if (OPT_FORCE_EXTRA_BOOST_LIBS)
163155
target_link_libraries(
164156
${bin_name} PRIVATE ${EXTRA_BOOST_TARGETS})
165157
endif ()

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ mentioned available parameters, which can be used in addition to standard
114114
ones provided by CMake itself, to modify the default build.
115115

116116
This project also has external dependencies, it requires an access to
117-
the [COMMS Library](https://github.com/commschamp/commsdsl) and
117+
the [COMMS Library](https://github.com/commschamp/comms) and
118118
code generators from [commsdsl](https://github.com/commschamp/commsdsl) projects.
119119
These dependencies are expected to be built independenty and access to them provided
120120
via standard **CMAKE_PREFIX_PATH** and/or **CMAKE_PROGRAM_PATH** (for the binaries of

howtos/howto1/include/howto1/Interface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Generated by commsdsl2comms v6.3.0
1+
// Generated by commsdsl2comms v6.3.3
22

33
/// @file
44
/// @brief Contains definition of <b>"Interface"</b> interface class.

howtos/howto1/include/howto1/InterfaceCommon.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Generated by commsdsl2comms v6.3.0
1+
// Generated by commsdsl2comms v6.3.3
22

33
/// @file
44
/// @brief Contains common template parameters independent functionality of

howtos/howto1/include/howto1/MsgId.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Generated by commsdsl2comms v6.3.0
1+
// Generated by commsdsl2comms v6.3.3
22

33
/// @file
44
/// @brief Contains definition of message ids enumeration.

howtos/howto1/include/howto1/Version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Generated by commsdsl2comms v6.3.0
1+
// Generated by commsdsl2comms v6.3.3
22

33
/// @file
44
/// @brief Contains protocol version definition.
@@ -22,5 +22,5 @@ inline constexpr unsigned specVersion()
2222
} // namespace howto1
2323

2424
// Generated compile time check for minimal supported version of the COMMS library
25-
static_assert(COMMS_MAKE_VERSION(5, 2, 2) <= comms::version(),
25+
static_assert(COMMS_MAKE_VERSION(5, 2, 5) <= comms::version(),
2626
"The version of COMMS library is too old");

howtos/howto1/include/howto1/dispatch/DispatchClientInputMessage.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Generated by commsdsl2comms v6.3.0
1+
// Generated by commsdsl2comms v6.3.3
22

33
/// @file
44
/// @brief Contains dispatch to handling function(s) for client input input messages.

howtos/howto1/include/howto1/dispatch/DispatchMessage.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Generated by commsdsl2comms v6.3.0
1+
// Generated by commsdsl2comms v6.3.3
22

33
/// @file
44
/// @brief Contains dispatch to handling function(s) for all input messages.

0 commit comments

Comments
 (0)