mirror of
https://github.com/zeromq/cppzmq.git
synced 2025-10-15 23:20:09 +02:00
Problem: code coverage not working
Solution: build tests within cppzmq build, and add separate demo
This commit is contained in:
23
demo/CMakeLists.txt
Normal file
23
demo/CMakeLists.txt
Normal file
@@ -0,0 +1,23 @@
|
||||
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
|
||||
|
||||
project(cppzmq-demo CXX)
|
||||
|
||||
find_package(cppzmq)
|
||||
|
||||
enable_testing()
|
||||
add_executable(
|
||||
demo
|
||||
main.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(
|
||||
demo
|
||||
libzmq
|
||||
)
|
||||
|
||||
add_test(
|
||||
NAME
|
||||
demo
|
||||
COMMAND
|
||||
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}/demo
|
||||
)
|
8
demo/main.cpp
Normal file
8
demo/main.cpp
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <zmq.hpp>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
zmq::context_t context;
|
||||
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user