diff --git a/.github/workflows/gha.yml b/.github/workflows/gha.yml index 8584473e0..58691a638 100644 --- a/.github/workflows/gha.yml +++ b/.github/workflows/gha.yml @@ -43,9 +43,9 @@ jobs: export CFLAGS=${NS_CFLAGS} && export CXXFLAGS=${NS_CXXFLAGS} && export LDFLAGS=${NS_LDFLAGS} [ ${{ matrix.pattern }} == 3 ] && \ export CFLAGS=${NS_CFLAGS} && export CXXFLAGS="${PROF_CXXFLAGS} "&& export LDFLAGS=${NS_LDFLAGS} - [ ${{ matrix.pattern }} == 0 ] && FLAGS="-DCMAKE_CXX_COMPILER=clang++ -DASYNC_MQTT_USE_TLS=OFF -DASYNC_MQTT_USE_WS=OFF -DASYNC_MQTT_USE_STR_CHECK=ON -DASYNC_MQTT_USE_LOG=ON -DASYNC_MQTT_PRINT_PAYLOAD=ON -DASYNC_MQTT_BUILD_EXAMPLES=ON " - [ ${{ matrix.pattern }} == 1 ] && FLAGS="-DCMAKE_CXX_COMPILER=clang++ -DASYNC_MQTT_USE_TLS=ON -DASYNC_MQTT_USE_WS=OFF -DASYNC_MQTT_USE_STR_CHECK=ON -DASYNC_MQTT_USE_LOG=OFF -DASYNC_MQTT_PRINT_PAYLOAD=OFF -DASYNC_MQTT_BUILD_EXAMPLES=ON " - [ ${{ matrix.pattern }} == 2 ] && FLAGS="-DCMAKE_CXX_COMPILER=clang++ -DASYNC_MQTT_USE_TLS=OFF -DASYNC_MQTT_USE_WS=ON -DASYNC_MQTT_USE_STR_CHECK=ON -DASYNC_MQTT_USE_LOG=OFF -DASYNC_MQTT_PRINT_PAYLOAD=ON -DASYNC_MQTT_BUILD_EXAMPLES=ON " + [ ${{ matrix.pattern }} == 0 ] && FLAGS="-DCMAKE_CXX_COMPILER=clang++ -DASYNC_MQTT_USE_TLS=OFF -DASYNC_MQTT_USE_WS=OFF -DASYNC_MQTT_USE_STR_CHECK=ON -DASYNC_MQTT_USE_LOG=ON -DASYNC_MQTT_PRINT_PAYLOAD=ON -DASYNC_MQTT_BUILD_EXAMPLES=ON -DASYNC_MQTT_BUILD_EXAMPLES_SEPARATE=ON " + [ ${{ matrix.pattern }} == 1 ] && FLAGS="-DCMAKE_CXX_COMPILER=clang++ -DASYNC_MQTT_USE_TLS=ON -DASYNC_MQTT_USE_WS=OFF -DASYNC_MQTT_USE_STR_CHECK=ON -DASYNC_MQTT_USE_LOG=OFF -DASYNC_MQTT_PRINT_PAYLOAD=OFF -DASYNC_MQTT_BUILD_EXAMPLES=ON -DASYNC_MQTT_BUILD_EXAMPLES_SEPARATE=ON " + [ ${{ matrix.pattern }} == 2 ] && FLAGS="-DCMAKE_CXX_COMPILER=clang++ -DASYNC_MQTT_USE_TLS=OFF -DASYNC_MQTT_USE_WS=ON -DASYNC_MQTT_USE_STR_CHECK=ON -DASYNC_MQTT_USE_LOG=OFF -DASYNC_MQTT_PRINT_PAYLOAD=ON -DASYNC_MQTT_BUILD_EXAMPLES=ON -DASYNC_MQTT_BUILD_EXAMPLES_SEPARATE=ON " [ ${{ matrix.pattern }} == 3 ] && FLAGS="-DCMAKE_CXX_COMPILER=clang++ -DASYNC_MQTT_USE_TLS=ON -DASYNC_MQTT_USE_WS=ON -DASYNC_MQTT_USE_STR_CHECK=ON -DASYNC_MQTT_USE_LOG=OFF -DASYNC_MQTT_PRINT_PAYLOAD=ON -DASYNC_MQTT_BUILD_EXAMPLES=OFF " FLAGS="${FLAGS} -DASYNC_MQTT_BUILD_TOOLS=ON -DASYNC_MQTT_BUILD_UNIT_TESTS=ON -DASYNC_MQTT_BUILD_SYSTEM_TESTS=ON" cmake -S ${{ github.workspace }} -B ${{ runner.temp }} ${FLAGS} -DCMAKE_C_FLAGS="${CFLAGS}" -DCMAKE_CXX_FLAGS="${CXXFLAGS}" -DCMAKE_EXE_LINKER_FLAGS="${LDFLAGS}" @@ -106,9 +106,9 @@ jobs: export CFLAGS=${NS_CFLAGS} && export CXXFLAGS=${NS_CXXFLAGS} && export LDFLAGS=${NS_LDFLAGS} [ ${{ matrix.pattern }} == 3 ] && \ export CFLAGS=${NS_CFLAGS} && export CXXFLAGS=${NS_CXXFLAGS_GCC} && export LDFLAGS=${NS_LDFLAGS} - [ ${{ matrix.pattern }} == 0 ] && FLAGS="-DCMAKE_CXX_COMPILER=clang++ -DASYNC_MQTT_USE_TLS=OFF -DASYNC_MQTT_USE_WS=OFF -DASYNC_MQTT_USE_STR_CHECK=ON -DASYNC_MQTT_USE_LOG=ON -DASYNC_MQTT_PRINT_PAYLOAD=OFF -DASYNC_MQTT_BUILD_EXAMPLES=ON " - [ ${{ matrix.pattern }} == 1 ] && FLAGS="-DCMAKE_CXX_COMPILER=clang++ -DASYNC_MQTT_USE_TLS=ON -DASYNC_MQTT_USE_WS=OFF -DASYNC_MQTT_USE_STR_CHECK=ON -DASYNC_MQTT_USE_LOG=OFF -DASYNC_MQTT_PRINT_PAYLOAD=ON -DASYNC_MQTT_BUILD_EXAMPLES=ON " - [ ${{ matrix.pattern }} == 2 ] && FLAGS="-DCMAKE_CXX_COMPILER=clang++ -DASYNC_MQTT_USE_TLS=OFF -DASYNC_MQTT_USE_WS=ON -DASYNC_MQTT_USE_STR_CHECK=ON -DASYNC_MQTT_USE_LOG=OFF -DASYNC_MQTT_PRINT_PAYLOAD=ON -DASYNC_MQTT_BUILD_EXAMPLES=ON " + [ ${{ matrix.pattern }} == 0 ] && FLAGS="-DCMAKE_CXX_COMPILER=clang++ -DASYNC_MQTT_USE_TLS=OFF -DASYNC_MQTT_USE_WS=OFF -DASYNC_MQTT_USE_STR_CHECK=ON -DASYNC_MQTT_USE_LOG=ON -DASYNC_MQTT_PRINT_PAYLOAD=OFF -DASYNC_MQTT_BUILD_EXAMPLES=ON -DASYNC_MQTT_BUILD_EXAMPLES_SEPARATE=ON " + [ ${{ matrix.pattern }} == 1 ] && FLAGS="-DCMAKE_CXX_COMPILER=clang++ -DASYNC_MQTT_USE_TLS=ON -DASYNC_MQTT_USE_WS=OFF -DASYNC_MQTT_USE_STR_CHECK=ON -DASYNC_MQTT_USE_LOG=OFF -DASYNC_MQTT_PRINT_PAYLOAD=ON -DASYNC_MQTT_BUILD_EXAMPLES=ON -DASYNC_MQTT_BUILD_EXAMPLES_SEPARATE=ON " + [ ${{ matrix.pattern }} == 2 ] && FLAGS="-DCMAKE_CXX_COMPILER=clang++ -DASYNC_MQTT_USE_TLS=OFF -DASYNC_MQTT_USE_WS=ON -DASYNC_MQTT_USE_STR_CHECK=ON -DASYNC_MQTT_USE_LOG=OFF -DASYNC_MQTT_PRINT_PAYLOAD=ON -DASYNC_MQTT_BUILD_EXAMPLES=ON -DASYNC_MQTT_BUILD_EXAMPLES_SEPARATE=ON " [ ${{ matrix.pattern }} == 3 ] && FLAGS="-DCMAKE_CXX_COMPILER=g++ -DASYNC_MQTT_USE_TLS=ON -DASYNC_MQTT_USE_WS=ON -DASYNC_MQTT_USE_STR_CHECK=OFF -DASYNC_MQTT_USE_LOG=OFF -DASYNC_MQTT_PRINT_PAYLOAD=OFF -DASYNC_MQTT_BUILD_EXAMPLES=OFF " FLAGS="$FLAGS -DASYNC_MQTT_BUILD_TOOLS=ON -DASYNC_MQTT_BUILD_UNIT_TESTS=ON -DASYNC_MQTT_BUILD_SYSTEM_TESTS=ON" BOOST_ROOT=/home/runner/work/async_mqtt/async_mqtt/usr cmake -S ${{ github.workspace }} -B ${{ runner.temp }} ${FLAGS} -DCMAKE_C_FLAGS="${CFLAGS}" -DCMAKE_CXX_FLAGS="${CXXFLAGS}" -DCMAKE_EXE_LINKER_FLAGS="${LDFLAGS}" @@ -152,29 +152,32 @@ jobs: run: | echo ${{ matrix.pattern }} if (${{ matrix.pattern }} -eq 0) { - $BUILD_TOOLS = "OFF" - $BUILD_EXAMPLES = "OFF" - $BUILD_UNIT_TESTS = "ON" - $BUILD_SYSTEM_TESTS = "OFF" + $BUILD_TOOLS = "OFF" + $BUILD_EXAMPLES = "OFF" + $BUILD_EXAMPLES_SEPARATE = "OFF" + $BUILD_UNIT_TESTS = "ON" + $BUILD_SYSTEM_TESTS = "OFF" } if (${{ matrix.pattern }} -eq 1) { - $BUILD_TOOLS = "ON" - $BUILD_EXAMPLES = "OFF" - $BUILD_UNIT_TESTS = "OFF" - $BUILD_SYSTEM_TESTS = "ON" + $BUILD_TOOLS = "ON" + $BUILD_EXAMPLES = "OFF" + $BUILD_EXAMPLES_SEPARATE = "OFF" + $BUILD_UNIT_TESTS = "OFF" + $BUILD_SYSTEM_TESTS = "ON" } if (${{ matrix.pattern }} -eq 2) { - $BUILD_TOOLS = "OFF" - $BUILD_EXAMPLES = "ON" - $BUILD_UNIT_TESTS = "OFF" - $BUILD_SYSTEM_TESTS = "OFF" + $BUILD_TOOLS = "OFF" + $BUILD_EXAMPLES = "ON" + $BUILD_EXAMPLES_SEPARATE = "ON" + $BUILD_UNIT_TESTS = "OFF" + $BUILD_SYSTEM_TESTS = "OFF" } $env:BOOST_ROOT="$PWD\boost" mkdir build cd build $env:CL="/D_WIN32_WINNT#0x0A00 /DBOOST_THREAD_VERSION#3 /DBOOST_ASIO_NO_DEPRECATED /bigobj /EHsc /Zc:preprocessor" $env:PATH="$env:BOOST_ROOT\lib;"+$env:PATH - cmake -A x64 -G "Visual Studio 16 2019" -DASYNC_MQTT_USE_TLS=OFF -DASYNC_MQTT_USE_WS=OFF -DASYNC_MQTT_USE_LOG=ON -DASYNC_MQTT_PRINT_PAYLOAD=ON -DASYNC_MQTT_BUILD_SYSTEM_TESTS="$BUILD_SYSTEM_TESTS" -DASYNC_MQTT_BUILD_UNIT_TESTS="$BUILD_UNIT_TESTS" -DASYNC_MQTT_BUILD_EXAMPLES="$BUILD_EXAMPLES" -DASYNC_MQTT_BUILD_TOOLS="$BUILD_TOOLS" .. + cmake -A x64 -G "Visual Studio 16 2019" -DASYNC_MQTT_USE_TLS=OFF -DASYNC_MQTT_USE_WS=OFF -DASYNC_MQTT_USE_LOG=ON -DASYNC_MQTT_PRINT_PAYLOAD=ON -DASYNC_MQTT_BUILD_SYSTEM_TESTS="$BUILD_SYSTEM_TESTS" -DASYNC_MQTT_BUILD_UNIT_TESTS="$BUILD_UNIT_TESTS" -DASYNC_MQTT_BUILD_EXAMPLES="$BUILD_EXAMPLES" -DASYNC_MQTT_BUILD_EXAMPLES_SEPARATE="$BUILD_EXAMPLES_SEPARATE" -DASYNC_MQTT_BUILD_TOOLS="$BUILD_TOOLS" .. if (!$?) { return Write-Error "cmake failed" } diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index bb7d7ae62..6cb5680e8 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -3,6 +3,7 @@ = History == 9.0.2 +* Added ASYNC_MQTT_BUILD_EXAMPLES_SEPARATE option to enable library separate build example. #359 * Fixed TLS timeout logic. #357 * Fixed broker auth file for docker. #356 diff --git a/CMakeLists.txt b/CMakeLists.txt index f2f85ffd1..3761ea73a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,6 +18,7 @@ option(ASYNC_MQTT_BUILD_UNIT_TESTS "Enable building unit tests" OFF) option(ASYNC_MQTT_BUILD_SYSTEM_TESTS "Enable building system tests" OFF) option(ASYNC_MQTT_BUILD_TOOLS "Enable building tools (broker, bench, etc.." OFF) option(ASYNC_MQTT_BUILD_EXAMPLES "Enable building example applications" OFF) +option(ASYNC_MQTT_BUILD_EXAMPLES_SEPARATE "Enable building separate library build example applications(It requires much memory)" OFF) option(ASYNC_MQTT_BUILD_LIB "Enable building separate compilation library" OFF) # Not implemented yet diff --git a/doc/CHANGELOG.html b/doc/CHANGELOG.html index 060192746..9559a9e54 100644 --- a/doc/CHANGELOG.html +++ b/doc/CHANGELOG.html @@ -69,6 +69,9 @@
Added ASYNC_MQTT_BUILD_EXAMPLES_SEPARATE option to enable library separate build example. #359
+Fixed TLS timeout logic. #357
Build examples
ASYNC_MQTT_BUILD_EXAMPLES_SEPARATE
Build examples for separate library build. It requires much memory.
ASYNC_MQTT_BUILD_LIB
Build separate compiled library