mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-cppkafka.git
synced 2025-11-02 19:47:55 +00:00
Add Doxygen documentation generation
This commit is contained in:
@@ -39,6 +39,22 @@ add_subdirectory(include)
|
|||||||
|
|
||||||
add_subdirectory(examples)
|
add_subdirectory(examples)
|
||||||
|
|
||||||
|
# Add a target to generate API documentation using Doxygen
|
||||||
|
find_package(Doxygen QUIET)
|
||||||
|
if(DOXYGEN_FOUND)
|
||||||
|
configure_file(
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/docs/Doxyfile.in
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
|
||||||
|
@ONLY
|
||||||
|
)
|
||||||
|
add_custom_target(
|
||||||
|
docs
|
||||||
|
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
COMMENT "Generating API documentation with Doxygen" VERBATIM
|
||||||
|
)
|
||||||
|
endif(DOXYGEN_FOUND)
|
||||||
|
|
||||||
set(GOOGLETEST_ROOT ${CMAKE_SOURCE_DIR}/third_party/googletest)
|
set(GOOGLETEST_ROOT ${CMAKE_SOURCE_DIR}/third_party/googletest)
|
||||||
if(EXISTS "${GOOGLETEST_ROOT}/CMakeLists.txt")
|
if(EXISTS "${GOOGLETEST_ROOT}/CMakeLists.txt")
|
||||||
set(GOOGLETEST_INCLUDE ${GOOGLETEST_ROOT}/googletest/include)
|
set(GOOGLETEST_INCLUDE ${GOOGLETEST_ROOT}/googletest/include)
|
||||||
|
|||||||
@@ -71,3 +71,9 @@ If you want to use _cppkafka_, you'll need to link your application with:
|
|||||||
|
|
||||||
* _cppkafka_
|
* _cppkafka_
|
||||||
* _rdkafka_
|
* _rdkafka_
|
||||||
|
|
||||||
|
# Documentation
|
||||||
|
|
||||||
|
You can generate the documentation by running `make docs` inside the build directory. This requires
|
||||||
|
_Doxygen_ to be installed. The documentation will be written in html format at
|
||||||
|
`<build-dir>/docs/html/`.
|
||||||
|
|||||||
1630
docs/Doxyfile.in
Normal file
1630
docs/Doxyfile.in
Normal file
File diff suppressed because it is too large
Load Diff
11
docs/mainpage.dox
Normal file
11
docs/mainpage.dox
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
/**
|
||||||
|
* \mainpage Documentation
|
||||||
|
*
|
||||||
|
* \section intro_sec Introduction
|
||||||
|
*
|
||||||
|
* <i>cppkafka</i> is a C++11 wrapper for <i>rdkafka</i>, an <i>Apache Kafka</i> client library.
|
||||||
|
*
|
||||||
|
* <i>cppkafka</i> provides a high level interface for producing and consuming <i>Kafka</i>
|
||||||
|
* messages.
|
||||||
|
*
|
||||||
|
*/
|
||||||
@@ -156,7 +156,7 @@ TEST_F(ConsumerTest, Rebalance) {
|
|||||||
consumer1.set_revocation_callback([&](const vector<TopicPartition>&) {
|
consumer1.set_revocation_callback([&](const vector<TopicPartition>&) {
|
||||||
revocation_called = true;
|
revocation_called = true;
|
||||||
});
|
});
|
||||||
consumer1.subscribe({ KAFKA_TOPIC });
|
consumer1.subscribe(KAFKA_TOPIC);
|
||||||
ConsumerRunner runner1(consumer1, 1, 3);
|
ConsumerRunner runner1(consumer1, 1, 3);
|
||||||
|
|
||||||
// Create a second consumer and subscribe to the topic
|
// Create a second consumer and subscribe to the topic
|
||||||
|
|||||||
Reference in New Issue
Block a user