1PROJECT(mqttcpp-tests) 2 3SET(MQTT_TEST_BROKER_HOST "localhost" CACHE STRING "Hostname of a test MQTT broker to use") 4SET(MQTT_TEST_PROXY_PORT "1884" CACHE STRING "Port of the test proxy to use") 5SET(MQTT_SSL_HOSTNAME "localhost" CACHE STRING "Hostname of a test SSL MQTT broker to use") 6SET(CERTDIR $ENV{TRAVIS_BUILD_DIR}/test/ssl) 7 8ADD_EXECUTABLE( 9 testcpp1 10 test1.cpp 11) 12 13target_compile_definitions(testcpp1 PRIVATE MQTTCLIENT_QOS1=1 MQTTCLIENT_QOS2=1) 14target_include_directories(testcpp1 PRIVATE "../src" "../src/linux") 15target_link_libraries(testcpp1 MQTTPacketClient MQTTPacketServer) 16 17ADD_TEST( 18 NAME testcpp1 19 COMMAND "testcpp1" "--host" ${MQTT_TEST_BROKER_HOST} 20) 21