Problem: code coverage not working

Solution: build tests within cppzmq build, and add separate demo
This commit is contained in:
Simon Giesecke
2018-04-02 13:21:11 +02:00
parent b737b9f1de
commit 63f81e40d6
6 changed files with 45 additions and 12 deletions

23
demo/CMakeLists.txt Normal file
View 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
View File

@@ -0,0 +1,8 @@
#include <zmq.hpp>
int main(int argc, char** argv)
{
zmq::context_t context;
return 0;
}