Skip to content

Commit

Permalink
Release v2.8
Browse files Browse the repository at this point in the history
  • Loading branch information
arobenko committed Jun 26, 2024
2 parents 857cf56 + 885678d commit a8c6692
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 175 deletions.
71 changes: 0 additions & 71 deletions .appveyor.yml

This file was deleted.

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

env:
COMMS_TAG: v5.2.3
COMMSDSL_TAG: v6.3.2
CC_TOOLS_QT_TAG: v5.2.1
COMMS_TAG: v5.2.5
COMMSDSL_TAG: v6.3.3
CC_TOOLS_QT_TAG: v5.3.1

jobs:
build_gcc_old_ubuntu_20_04:
Expand Down
15 changes: 12 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required (VERSION 3.10)
project ("cc.demo3.commsdsl")

option (DEMO3_WARN_AS_ERR "Treat compilation warnings as errors." ON)
option (DEMO3_USE_CCACHE "Use ccache on UNIX." ON)
option (DEMO3_USE_CCACHE "Use ccache." OFF)
option (DEMO3_GEN_PROTOCOL "Use commsdsl2comms to generate protocol definition" ON)
option (DEMO3_BUILD_PROTOCOL "Build and install protocol definition generated by the commsdsl2comms" ${DEMO3_GEN_PROTOCOL})
option (DEMO3_BUILD_PROT_DOC "Build documentation for generated protocol" OFF)
Expand All @@ -26,14 +26,15 @@ option (DEMO3_BUILD_EXAMPLES "Build examples." ON)
# DEMO3_SWIG_SRC_DIR - Path to the commsdsl2swig sources. If not provided local "src/swig" dir is used.
# DEMO3_SWIG_LANGUAGES - Languages list to support by swig. If not provided "python java csharp" are chosen
# DEMO3_EMSCRIPTEN_OUTPUT_DIR - Path to emscripten output directory. If not provided <build_dir>/output_emscripten one is used.
# DEMO3_CCACHE_EXECUTABLE - Custom ccache executable
# COMMSDSL2COMMS_EXTRA_ARGS - Extra arguments to pass to "commsdsl2comms"
# COMMSDSL2TEST_EXTRA_ARGS - Extra arguments to pass to "commsdsl2test"
# COMMSDSL2TOOLS_QT_EXTRA_ARGS - Extra arguments to pass to "commsdsl2tools_qt"
# COMMSDSL2SWIG_EXTRA_ARGS - Extra arguments to pass to "commsdsl2swig"
# COMMSDSL2EMSCRIPTEN_EXTRA_ARGS - Extra arguments to pass to "commsdsl2emscripten"

set (DEMO3_VERSION "2.7")
set (DEMO3_MIN_COMMSDSL_VERSION "6.3.2")
set (DEMO3_VERSION "2.8")
set (DEMO3_MIN_COMMSDSL_VERSION "6.3.3")

set (EXTERNALS_DIR "${PROJECT_SOURCE_DIR}/externals")

Expand Down Expand Up @@ -202,6 +203,8 @@ if (DEMO3_GEN_TEST)
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_EXE_LINKER_FLAGS=${CMAKE_EXE_LINKER_FLAGS}
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
-DCMAKE_PREFIX_PATH=${combined_prefix_path_str}
-DOPT_USE_CCACHE=${DEMO3_USE_CCACHE}
-DOPT_CCACHE_EXECUTABLE=${DEMO3_CCACHE_EXECUTABLE}
)
endif ()
endif ()
Expand Down Expand Up @@ -261,6 +264,8 @@ if (DEMO3_GEN_TOOLS)
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_EXE_LINKER_FLAGS=${CMAKE_EXE_LINKER_FLAGS}
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DCMAKE_PREFIX_PATH=${combined_prefix_path_str}
-DOPT_QT_MAJOR_VERSION=${DEMO3_TOOLS_QT_VER}
-DOPT_USE_CCACHE=${DEMO3_USE_CCACHE}
-DOPT_CCACHE_EXECUTABLE=${DEMO3_CCACHE_EXECUTABLE}
)
endif ()
endif ()
Expand Down Expand Up @@ -322,6 +327,8 @@ if (DEMO3_GEN_SWIG)
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
-DCMAKE_PREFIX_PATH=${combined_prefix_path_str}
-DOPT_SWIG_LANGUAGES=${combined_languages_str}
-DOPT_USE_CCACHE=${DEMO3_USE_CCACHE}
-DOPT_CCACHE_EXECUTABLE=${DEMO3_CCACHE_EXECUTABLE}
INSTALL_COMMAND
${CMAKE_COMMAND} -E echo "Skipping install"
)
Expand Down Expand Up @@ -390,6 +397,8 @@ if (DEMO3_GEN_EMSCRIPTEN)
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
-DOPT_MODULARIZE=ON
-DOPT_EXTRA_INCLUDE_DIRS=${extra_includes_path_str}
-DOPT_USE_CCACHE=${DEMO3_USE_CCACHE}
-DOPT_CCACHE_EXECUTABLE=${DEMO3_CCACHE_EXECUTABLE}
)
endif ()
endif ()
Expand Down
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,15 @@ where
- **PAYLOAD** is message payload.
- **CHECKSUM** is 16 bit **CRC-CCITTT** checksum of `SIZE | ID | PAYLOAD` bytes.

The **generated** CMake project of this protocol definition is hosted and can be
viewed at [cc.demo3.generated](https://github.com/commschamp/cc.demo3.generated)
The code generators from the [commsdsl](https://github.com/commschamp/commsdsl)
repository generate full CMake projects.
Some of these **generated** projects are hosted as separate
repositories that can be viewed and used independently.

- [cc.demo3.generated](https://github.com/commschamp/cc.demo3.generated) - Protocol
definition
- [cc.demo3_protocol.cc_tools_plugin](https://github.com/commschamp/cc.demo3_protocol.cc_tools_plugin) -
Protocol plugin for the [CommsChampion Tools](https://github.com/commschamp/cc_tools_qt).

# Examples
The [client](examples/client) reads requested version value from standard input.
Expand All @@ -53,16 +60,15 @@ 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
the code generators). There are also scripts (
[script/prepare_externals.sh](script/prepare_externals.sh) for Linux and
[script/prepare_externals.bat](script/prepare_externals.bat) for Windows)
which can help in preparation of these dependencies. They are also used
in configuration of the [github actions](.github/workflows/actions_build.yml) and
[appveyor](.appveyor.yml).
in configuration of the [github actions](.github/workflows/actions_build.yml).

The project's cmake configuration [options](CMakeLists.txt) allow building
bindings to other high level programming languages using [swig](https://www.swig.org/)
Expand Down
13 changes: 8 additions & 5 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,20 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/common/include)
set (cc_compile_file "${LibComms_DIR}/CC_Compile.cmake")
include (${cc_compile_file})

set (warn_as_err_opt)
set (extra_opts)
if (DEMO3_WARN_AS_ERR)
set (warn_as_err_opt WARN_AS_ERR)
list (APPEND extra_opts WARN_AS_ERR)
endif()

set (ccache_opt)
if (DEMO3_USE_CCACHE)
set (ccache_opt USE_CCACHE)
list (APPEND extra_opts USE_CCACHE)

if (NOT "${DEMO3_CCACHE_EXECUTABLE}" STREQUAL "")
list (APPEND extra_opts CCACHE_EXECTUABLE "${DEMO3_CCACHE_EXECUTABLE}")
endif ()
endif()

cc_compile(${warn_as_err_opt} ${ccache_opt})
cc_compile(${extra_opts})
cc_msvc_force_warn_opt("/W4")

add_subdirectory (server)
Expand Down
87 changes: 0 additions & 87 deletions script/appveyor_install.bat

This file was deleted.

4 changes: 3 additions & 1 deletion script/full_debug_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@ export BUILD_DIR="${ROOT_DIR}/build.full.${CC}"
export COMMON_INSTALL_DIR=${BUILD_DIR}/install
export COMMON_BUILD_TYPE=Debug
export EXTERNALS_DIR=${ROOT_DIR}/externals
export COMMON_USE_CCACHE=ON
mkdir -p ${BUILD_DIR}

${SCRIPT_DIR}/prepare_externals.sh

cd ${BUILD_DIR}
cmake .. -DCMAKE_INSTALL_PREFIX=${COMMON_INSTALL_DIR} \
-DCMAKE_BUILD_TYPE=Debug -DDEMO3_BUILD_PROT_DOC=ON -DDEMO3_GEN_TEST=ON \
-DDEMO3_GEN_TOOLS=ON -DDEMO3_GEN_SWIG=ON -DDEMO3_GEN_EMSCRIPTEN=ON "$@"
-DDEMO3_GEN_TOOLS=ON -DDEMO3_GEN_SWIG=ON -DDEMO3_GEN_EMSCRIPTEN=ON \
-DDEMO3_USE_CCACHE=ON "$@"

procs=$(nproc)
if [ -n "${procs}" ]; then
Expand Down
6 changes: 6 additions & 0 deletions script/prepare_externals.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
# COMMON_CXX_STANDARD - (Optional) CMake C++ standard
# COMMON_CMAKE_GENERATOR - (Optional) CMake generator
# COMMON_CMAKE_PLATFORM - (Optional) CMake platform
# COMMON_USE_CCACHE - (Optional) Common "use ccache" parameter
# COMMON_CCACHE_EXECUTABLE - (Optional) Common ccache executable

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

Expand Down Expand Up @@ -141,6 +143,8 @@ function build_commsdsl() {
CC=${CC_COMMSDSL} CXX=${CXX_COMMSDSL} cmake \
-S ${COMMSDSL_SRC_DIR} -B ${COMMSDSL_BUILD_DIR} \
-DCMAKE_INSTALL_PREFIX=${COMMSDSL_INSTALL_DIR} -DCMAKE_BUILD_TYPE=${COMMON_BUILD_TYPE} \
${COMMON_USE_CCACHE:+"-DCOMMSDSL_USE_CCACHE=${COMMON_USE_CCACHE}"} \
${COMMON_CCACHE_EXECUTABLE:+"-DCOMMSDSL_CCACHE_EXECUTABLE=${COMMON_CCACHE_EXECUTABLE}"} \
-DCOMMSDSL_INSTALL_LIBRARY=OFF -DCOMMSDSL_BUILD_COMMSDSL2TEST=ON -DCOMMSDSL_BUILD_COMMSDSL2TOOLS_QT=ON \
-DCOMMSDSL_BUILD_COMMSDSL2SWIG=ON -DCOMMSDSL_BUILD_COMMSDSL2EMSCRIPTEN=ON
cmake --build ${COMMSDSL_BUILD_DIR} --config ${COMMON_BUILD_TYPE} --target install ${procs_param}
Expand Down Expand Up @@ -172,6 +176,8 @@ function build_cc_tools_qt() {
cmake \
${COMMON_CMAKE_GENERATOR:+"-G ${COMMON_CMAKE_GENERATOR}"} ${COMMON_CMAKE_PLATFORM:+"-A ${COMMON_CMAKE_PLATFORM}"} \
-S ${CC_TOOLS_QT_SRC_DIR} -B ${CC_TOOLS_QT_BUILD_DIR} -DCMAKE_INSTALL_PREFIX=${CC_TOOLS_QT_INSTALL_DIR} \
${COMMON_USE_CCACHE:+"-DCC_TOOLS_QT_USE_CCACHE=${COMMON_USE_CCACHE}"} \
${COMMON_CCACHE_EXECUTABLE:+"-DCC_TOOLS_QT_CCACHE_EXECUTABLE=${COMMON_CCACHE_EXECUTABLE}"} \
-DCMAKE_BUILD_TYPE=${COMMON_BUILD_TYPE} -DCC_TOOLS_QT_BUILD_APPS=OFF -DCMAKE_PREFIX_PATH=${COMMS_INSTALL_DIR} \
-DCMAKE_CXX_STANDARD=${COMMON_CXX_STANDARD} ${CC_TOOLS_QT_VERSION_OPT}
cmake --build ${CC_TOOLS_QT_BUILD_DIR} --config ${COMMON_BUILD_TYPE} --target install ${procs_param}
Expand Down

0 comments on commit a8c6692

Please sign in to comment.