Skip to content

Commit

Permalink
Release v6.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
arobenko committed Sep 27, 2023
2 parents 7dab7da + 1480d6e commit 2ca2196
Show file tree
Hide file tree
Showing 11 changed files with 83 additions and 12 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/actions_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ jobs:
type: [Debug, Release, MinSizeRel]
cc_ver: [9, 10, 11, 12]
cpp: [11, 14, 17, 20]
qt_ver: [5, 6]

steps:
- uses: actions/checkout@v2
Expand All @@ -151,7 +152,7 @@ jobs:

- name: Install Packages
run: |
sudo apt install libqt5gui5 qtbase5-dev libxml2-dev doxygen gcc-${{matrix.cc_ver}} g++-${{matrix.cc_ver}} \
sudo apt install libqt${{matrix.qt_ver}}gui${{matrix.qt_ver}} qtbase5-dev qt6-base-dev libxml2-dev doxygen gcc-${{matrix.cc_ver}} g++-${{matrix.cc_ver}} \
python3 libpython3-dev swig default-jdk default-jre emscripten nodejs
- name: Create Build Environment
Expand All @@ -170,13 +171,15 @@ jobs:
COMMON_CXX_STANDARD: ${{matrix.cpp}}
COMMS_TAG: ${{env.COMMS_BRANCH}}
CC_TOOLS_QT_TAG: ${{env.CC_TOOLS_QT_BRANCH}}
CC_TOOLS_QT_MAJOR_QT_VERSION: ${{matrix.qt_ver}}

- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/build
run: |
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{matrix.type}} -DCMAKE_INSTALL_PREFIX=install \
-DCMAKE_PREFIX_PATH=${{runner.workspace}}/build/install -DCOMMSDSL_TESTS_CXX_STANDARD=${{matrix.cpp}} \
-DCOMMSDSL_TESTS_QT_VERSION=${{matrix.qt_ver}} \
-DCOMMSDSL_BUILD_UNIT_TESTS=ON -DCOMMSDSL_TEST_BUILD_DOC=ON -DCMAKE_IGNORE_PATH=/usr/local/bin \
-DCOMMSDSL_BUILD_COMMSDSL2TEST=ON -DCOMMSDSL_BUILD_COMMSDSL2TOOLS_QT=ON \
-DCOMMSDSL_BUILD_COMMSDSL2SWIG=ON -DCOMMSDSL_BUILD_COMMSDSL2EMSCRIPTEN=ON
Expand Down Expand Up @@ -339,6 +342,7 @@ jobs:
type: [Debug, Release, MinSizeRel]
cc_ver: [12, 13, 14]
cpp: [11, 14, 17, 20]
qt_ver: [5, 6]

steps:
- uses: actions/checkout@v2
Expand All @@ -348,7 +352,7 @@ jobs:

- name: Install Packages
run: |
sudo apt install libqt5gui5 qtbase5-dev libxml2-dev clang-${{matrix.cc_ver}} \
sudo apt install libqt${{matrix.qt_ver}}gui${{matrix.qt_ver}} qtbase5-dev qt6-base-dev libxml2-dev clang-${{matrix.cc_ver}} \
python3 libpython3-dev swig default-jdk default-jre emscripten nodejs
- name: Create Build Environment
Expand All @@ -367,13 +371,15 @@ jobs:
COMMON_CXX_STANDARD: ${{matrix.cpp}}
COMMS_TAG: ${{env.COMMS_BRANCH}}
CC_TOOLS_QT_TAG: ${{env.CC_TOOLS_QT_BRANCH}}
CC_TOOLS_QT_MAJOR_QT_VERSION: ${{matrix.qt_ver}}

- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/build
run: |
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{matrix.type}} -DCMAKE_INSTALL_PREFIX=install \
-DCMAKE_PREFIX_PATH=${{runner.workspace}}/build/install -DCOMMSDSL_TESTS_CXX_STANDARD=${{matrix.cpp}} \
-DCOMMSDSL_TESTS_QT_VERSION=${{matrix.qt_ver}} \
-DCOMMSDSL_BUILD_UNIT_TESTS=ON -DCMAKE_IGNORE_PATH=/usr/local/bin \
-DCOMMSDSL_BUILD_COMMSDSL2TEST=ON -DCOMMSDSL_BUILD_COMMSDSL2TOOLS_QT=ON \
-DCOMMSDSL_BUILD_COMMSDSL2SWIG=ON -DCOMMSDSL_BUILD_COMMSDSL2EMSCRIPTEN=ON
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ option (COMMSDSL_WIN_ALLOW_LIBXML_BUILD "Allow internal build of libxml2 on Wind
# COMMSDSL_TESTS_C_COMPILER - C compiler to build unittests
# COMMSDSL_TESTS_CXX_COMPILER - C++ compiler to build unittests
# COMMSDSL_EXTERNALS_DIR - Directory to contain sources for external projects, defaults to ${PROJECT_SOURCE_DIR}/externals.
set (COMMSDSL_TESTS_QT_VERSION 5 CACHE STRING "The major Qt version for tests")

# Deprecated options for backward compatibility, use the ones above for new builds.
# ---------------------------
Expand Down
14 changes: 9 additions & 5 deletions app/commsdsl2tools_qt/src/ToolsQtCmake.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ bool ToolsQtCmake::testWriteInternal() const
static const std::string Template =
"cmake_minimum_required (VERSION 3.1)\n"
"project (\"#^#MAIN_NS#$#_cc_tools_qt_plugin\")\n\n"
"set (OPT_QT_MAJOR_VERSION 5 CACHE STRING \"The major Qt version\")\n\n"
"find_package(LibComms REQUIRED)\n"
"find_package(#^#MAIN_NS#$# REQUIRED)\n"
"find_package(cc_tools_qt REQUIRED)\n"
"find_package(Qt5Widgets REQUIRED)\n"
"find_package(Qt5Core REQUIRED)\n\n"
"find_package(Qt${OPT_QT_MAJOR_VERSION} REQUIRED COMPONENTS Widgets Core)\n"
"include(${LibComms_DIR}/CC_Compile.cmake)\n"
"cc_compile(WARN_AS_ERR)\n"
"cc_msvc_force_warn_opt(/W4)\n\n"
Expand All @@ -77,7 +77,7 @@ bool ToolsQtCmake::testWriteInternal() const
" #^#CORE_FILES#$#\n"
" )\n\n"
" add_library (${name} STATIC ${src})\n"
" target_link_libraries (${name} PUBLIC cc::#^#MAIN_NS#$# cc::comms cc::cc_tools_qt Qt5::Widgets Qt5::Core)\n"
" target_link_libraries (${name} PUBLIC cc::#^#MAIN_NS#$# cc::comms cc::cc_tools_qt Qt${OPT_QT_MAJOR_VERSION}::Widgets Qt${OPT_QT_MAJOR_VERSION}::Core)\n"
" target_include_directories (${name} PUBLIC ${PROJECT_SOURCE_DIR})\n"
" target_compile_options(${name} PRIVATE\n"
" $<$<CXX_COMPILER_ID:MSVC>:/bigobj /wd4127 /wd5054>\n"
Expand Down Expand Up @@ -107,13 +107,17 @@ bool ToolsQtCmake::testWriteInternal() const
" list (APPEND src #^#TOP_NS#$#/#^#MAIN_NS#$#/plugin/ConfigWidget_${protocol}.cpp)\n"
" list (APPEND hdr #^#TOP_NS#$#/#^#MAIN_NS#$#/plugin/ConfigWidget_${protocol}.h)\n"
" endif ()\n\n"
" qt5_wrap_cpp(moc ${hdr})\n\n"
" if (${OPT_QT_MAJOR_VERSION} EQUAL 5)\n"
" qt5_wrap_cpp(moc ${hdr})\n"
" elseif (${OPT_QT_MAJOR_VERSION} EQUAL 6)\n"
" qt6_wrap_cpp(moc ${hdr})\n"
" endif ()\n\n"
" set(extra_link_opts)\n"
" if (CMAKE_COMPILER_IS_GNUCC)\n"
" set(extra_link_opts \"-Wl,--no-undefined\")\n"
" endif ()\n\n"
" add_library (${name} MODULE ${src} ${moc})\n"
" target_link_libraries (${name} ${CORE_LIB_NAME} cc::cc_tools_qt Qt5::Widgets Qt5::Core ${extra_link_opts})\n"
" target_link_libraries (${name} ${CORE_LIB_NAME} cc::cc_tools_qt Qt${OPT_QT_MAJOR_VERSION}::Widgets Qt${OPT_QT_MAJOR_VERSION}::Core ${extra_link_opts})\n"
" target_compile_options(${name} PRIVATE\n"
" $<$<CXX_COMPILER_ID:MSVC>:/bigobj /wd4127 /wd5054>\n"
" $<$<CXX_COMPILER_ID:GNU>:-ftemplate-depth=2048 -fconstexpr-depth=4096>\n"
Expand Down
1 change: 1 addition & 0 deletions app/commsdsl2tools_qt/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ foreach (name ${tests})
-DCMAKE_CXX_STANDARD=${COMMSDSL_TESTS_CXX_STANDARD}
-DCMAKE_INSTALL_PREFIX=${install_dir}
-DCMAKE_PREFIX_PATH=${build_prefix_path_str}
-DOPT_QT_MAJOR_VERSION=${COMMSDSL_TESTS_QT_VERSION}
)

add_dependencies(${APP_NAME}.all_tests ${build_tgt})
Expand Down
2 changes: 1 addition & 1 deletion lib/include/commsdsl/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#define COMMSDSL_MINOR_VERSION 2U

/// @brief Patch level of the library
#define COMMSDSL_PATCH_VERSION 2U
#define COMMSDSL_PATCH_VERSION 3U

/// @brief Macro to create numeric version as single unsigned number
#define COMMSDSL_MAKE_VERSION(major_, minor_, patch_) \
Expand Down
2 changes: 1 addition & 1 deletion script/appveyor_install.bat
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,6 @@ IF NOT EXIST %QTDIR% (
set QTDIR=%QTDIR_PREFIX%/msvc2015%QTDIR_SUFFIX%
)

echo Using Qt5 from %QTDIR%
echo Using Qt from %QTDIR%


29 changes: 29 additions & 0 deletions script/full_debug_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash

if [ -z "${CC}" -o -z "$CXX" ]; then
echo "ERROR: Compilers are not provided"
exit 1
fi

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
ROOT_DIR=$( dirname ${SCRIPT_DIR} )
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
mkdir -p ${BUILD_DIR}

${SCRIPT_DIR}/prepare_externals.sh

cd ${BUILD_DIR}
cmake .. -DCMAKE_PREFIX_PATH=${COMMON_INSTALL_DIR} \
-DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Debug -DCOMMSDSL_BUILD_UNIT_TESTS=ON -DCOMMSDSL_TEST_BUILD_DOC=ON \
-DCOMMSDSL_BUILD_COMMSDSL2TEST=ON -DCOMMSDSL_BUILD_COMMSDSL2TOOLS_QT=ON -DCOMMSDSL_BUILD_COMMSDSL2SWIG=ON \
-DCOMMSDSL_BUILD_COMMSDSL2EMSCRIPTEN=ON "$@"

procs=$(nproc)
if [ -n "${procs}" ]; then
procs_param="--parallel ${procs}"
fi

cmake --build ${BUILD_DIR} --config ${COMMON_BUILD_TYPE} --target install ${procs_param}
8 changes: 8 additions & 0 deletions script/full_debug_build_clang.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

export CC=clang
export CXX=clang++

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
${SCRIPT_DIR}/full_debug_build.sh "$@"

8 changes: 8 additions & 0 deletions script/full_debug_build_gcc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

export CC=gcc
export CXX=g++

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
${SCRIPT_DIR}/full_debug_build.sh "$@"

11 changes: 9 additions & 2 deletions script/prepare_externals.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ rem COMMS_REPO - (Optional) Repository of the COMMS library
rem COMMS_TAG - (Optional) Tag of the COMMS library
rem CC_TOOLS_QT_REPO - (Optional) Repository of the cc_tools_qt
rem CC_TOOLS_QT_TAG - (Optional) Tag of the cc_tools_qt
rem CC_TOOLS_QT_MAJOR_QT_VERSION - (Optional) Major version of the Qt library
rem COMMON_INSTALL_DIR - (Optional) Common directory to perform installations
rem COMMON_BUILD_TYPE - (Optional) CMake build type
rem COMMON_CXX_STANDARD - (Optional) CMake C++ standard
Expand Down Expand Up @@ -38,6 +39,9 @@ set CC_TOOLS_QT_SRC_DIR=%EXTERNALS_DIR%/cc_tools_qt
set CC_TOOLS_QT_BUILD_DIR=%BUILD_DIR%/externals/cc_tools_qt/build
set CC_TOOLS_QT_INSTALL_DIR=%CC_TOOLS_QT_BUILD_DIR%/install
if NOT [%COMMON_INSTALL_DIR%] == [] set CC_TOOLS_QT_INSTALL_DIR=%COMMON_INSTALL_DIR%
set CC_TOOLS_QT_VERSION_OPT=
if NOT [%CC_TOOLS_QT_MAJOR_QT_VERSION%] == [] set CC_TOOLS_QT_VERSION_OPT="-DCC_TOOLS_QT_MAJOR_QT_VERSION=%CC_TOOLS_QT_MAJOR_QT_VERSION%"


rem ----------------------------------------------------

Expand All @@ -59,7 +63,8 @@ if %errorlevel% neq 0 exit /b %errorlevel%
echo "Building COMMS library..."
mkdir "%COMMS_BUILD_DIR%"
cd %COMMS_BUILD_DIR%
cmake -G %GENERATOR% -S %COMMS_SRC_DIR% -B %COMMS_BUILD_DIR% -DCMAKE_INSTALL_PREFIX=%COMMS_INSTALL_DIR% -DCMAKE_BUILD_TYPE=%COMMON_BUILD_TYPE% -DCMAKE_CXX_STANDARD=%COMMON_CXX_STANDARD%
cmake -G %GENERATOR% -S %COMMS_SRC_DIR% -B %COMMS_BUILD_DIR% -DCMAKE_INSTALL_PREFIX=%COMMS_INSTALL_DIR% ^
-DCMAKE_BUILD_TYPE=%COMMON_BUILD_TYPE% -DCMAKE_CXX_STANDARD=%COMMON_CXX_STANDARD%
if %errorlevel% neq 0 exit /b %errorlevel%
cmake --build %COMMS_BUILD_DIR% --config %COMMON_BUILD_TYPE% --target install
if %errorlevel% neq 0 exit /b %errorlevel%
Expand All @@ -80,7 +85,9 @@ git checkout %CC_TOOLS_QT_TAG%
echo "Building cc_tools_qt ..."
mkdir "%CC_TOOLS_QT_BUILD_DIR%"
cd %CC_TOOLS_QT_BUILD_DIR%
cmake -G %GENERATOR% -S %CC_TOOLS_QT_SRC_DIR% -B %CC_TOOLS_QT_BUILD_DIR% -DCMAKE_INSTALL_PREFIX=%CC_TOOLS_QT_INSTALL_DIR% -DCMAKE_BUILD_TYPE=%COMMON_BUILD_TYPE% -DCC_TOOLS_QT_BUILD_APPS=OFF -DCMAKE_PREFIX_PATH=%COMMS_INSTALL_DIR%;%QTDIR% -DCMAKE_CXX_STANDARD=%COMMON_CXX_STANDARD%
cmake -G %GENERATOR% -S %CC_TOOLS_QT_SRC_DIR% -B %CC_TOOLS_QT_BUILD_DIR% -DCMAKE_INSTALL_PREFIX=%CC_TOOLS_QT_INSTALL_DIR% ^
-DCMAKE_BUILD_TYPE=%COMMON_BUILD_TYPE% -DCC_TOOLS_QT_BUILD_APPS=OFF -DCMAKE_PREFIX_PATH=%COMMS_INSTALL_DIR%;%QTDIR% ^
-DCMAKE_CXX_STANDARD=%COMMON_CXX_STANDARD% %CC_TOOLS_QT_VERSION_OPT%
if %errorlevel% neq 0 exit /b %errorlevel%
cmake --build %CC_TOOLS_QT_BUILD_DIR% --config %COMMON_BUILD_TYPE% --target install
if %errorlevel% neq 0 exit /b %errorlevel%
9 changes: 8 additions & 1 deletion script/prepare_externals.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# CC_TOOLS_QT_REPO - (Optional) Repository of the cc_tools_qt
# CC_TOOLS_QT_TAG - (Optional) Tag of the cc_tools_qt
# CC_TOOLS_QT_SKIP - (Optional) Skip build of cc_tools_qt
# CC_TOOLS_QT_MAJOR_QT_VERSION - (Optional) Major version of the Qt library
# COMMON_INSTALL_DIR - (Optional) Common directory to perform installations
# COMMON_BUILD_TYPE - (Optional) CMake build type
# COMMON_CXX_STANDARD - (Optional) CMake C++ standard
Expand Down Expand Up @@ -58,6 +59,10 @@ CC_TOOLS_QT_INSTALL_DIR=${CC_TOOLS_QT_BUILD_DIR}/install
if [ -n "${COMMON_INSTALL_DIR}" ]; then
CC_TOOLS_QT_INSTALL_DIR=${COMMON_INSTALL_DIR}
fi
CC_TOOLS_QT_VERSION_OPT=
if [ -n "${CC_TOOLS_QT_MAJOR_QT_VERSION}" ]; then
CC_TOOLS_QT_VERSION_OPT="-DCC_TOOLS_QT_MAJOR_QT_VERSION=${CC_TOOLS_QT_MAJOR_QT_VERSION}"
fi

procs=$(nproc)
if [ -n "${procs}" ]; then
Expand Down Expand Up @@ -98,7 +103,9 @@ function build_cc_tools_qt() {

echo "Building cc_tools_qt ..."
mkdir -p ${CC_TOOLS_QT_BUILD_DIR}
cmake -S ${CC_TOOLS_QT_SRC_DIR} -B ${CC_TOOLS_QT_BUILD_DIR} -DCMAKE_INSTALL_PREFIX=${CC_TOOLS_QT_INSTALL_DIR} -DCMAKE_BUILD_TYPE=${COMMON_BUILD_TYPE} -DCC_TOOLS_QT_BUILD_APPS=OFF -DCMAKE_PREFIX_PATH=${COMMS_INSTALL_DIR} -DCMAKE_CXX_STANDARD=${COMMON_CXX_STANDARD}
cmake -S ${CC_TOOLS_QT_SRC_DIR} -B ${CC_TOOLS_QT_BUILD_DIR} -DCMAKE_INSTALL_PREFIX=${CC_TOOLS_QT_INSTALL_DIR} \
-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 2ca2196

Please sign in to comment.