to produce coverage information while running the tests, call cmake with
the following options:
cmake -DCMAKE_C_FLAGS=-coverage -DCMAKE_CXX_FLAGS=-coverage <build-dir>
Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
CMake <3.19 does not support interface targets with sources.
For better IDE integrations we still can add the config.h using the
`target_sources` command.
Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
Use `ctest` or `make test` to run all tests.
With this it's also possible to run tests on a Mac.
Relative paths used in tests become absolute ones to make tests
executable from any build folder.
Also fixed race condition in
test/broker/11-persistent-subscription-no-local.py
Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
This is an interface cmake target which specifies include directories
required by the config.h places in the root of the project.
This header is a "public" header visible to plugins linking the
mosquitto exports.
Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
Instead of using the CMAKE_OPENSSL_INCLUDE and CMAKE_OPENSSL_LIBRARY
variables the imported target OpenSSL::SSL is used.
This is a more modern way of target linking.
Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
instead of ignoring this error, we throw an exception
the previous way might cause hard to find issues
Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
Core symbols needed by plugins are now properly linked to their objects
* Remove link_directories() call:
This specification is not necessary for our own libraries as cmake
shares this information over the targets.
If needed they should be specified target specific, like done for
the external DLT library.
Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
CMake >= 3.14 comes with a preinstalled FindSQLite3 module, which now
replaces the self-written one.
Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>