Skip to content

Commit

Permalink
Added ASYNC_MQTT_BUILD_EXAMPLES_SEPARATE cmake option.
Browse files Browse the repository at this point in the history
OFF by default.
If set ON, then build `examples/separate_client` and `examples/separate_endpoint`.
  • Loading branch information
redboltz committed Oct 12, 2024
1 parent d0966f1 commit 85763ea
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions doc/CHANGELOG.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ <h2 id="_9_0_2">9.0.2</h2>
<div class="ulist">
<ul>
<li>
<p>Added ASYNC_MQTT_BUILD_EXAMPLES_SEPARATE option to enable library separate build example. #359</p>
</li>
<li>
<p>Fixed TLS timeout logic. #357</p>
</li>
<li>
Expand Down
4 changes: 4 additions & 0 deletions doc/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,10 @@ <h2 id="_cmake">cmake</h2>
<td class="tableblock halign-left valign-top"><p class="tableblock">Build examples</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">ASYNC_MQTT_BUILD_EXAMPLES_SEPARATE</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Build examples for separate library build. It requires much memory.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">ASYNC_MQTT_BUILD_LIB</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Build separate compiled library</p></td>
</tr>
Expand Down
7 changes: 4 additions & 3 deletions example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ if("cxx_std_20" IN_LIST CMAKE_CXX_COMPILE_FEATURES)
cl_cpp20coro_mqtt_sub.cpp
ep_cpp20coro_mqtt_client.cpp
)

add_subdirectory(separate_client)
add_subdirectory(separate_endpoint)
if(ASYNC_MQTT_BUILD_EXAMPLE_SEPARATE)
add_subdirectory(separate_client)
add_subdirectory(separate_endpoint)
endif()
endif()

if(ASYNC_MQTT_USE_TLS)
Expand Down

0 comments on commit 85763ea

Please # to comment.