1PROJECT(mqttpacket-tests) 2 3IF (WIN32) 4 SET(MQTT_TEST_BROKER "tcp://mqtt.iotree.co.uk:1883" CACHE STRING "Hostname of a test MQTT broker to use") 5 SET(MQTT_TEST_PROXY "tcp://localhost:1883" CACHE STRING "Hostname of the test proxy to use") 6 SET(MQTT_SSL_HOSTNAME "mqtt.iotree.co.uk" CACHE STRING "Hostname of a test SSL MQTT broker to use") 7 SET(CERTDIR $ENV{APPVEYOR_BUILD_FOLDER}/test/ssl) 8ELSE () 9 SET(MQTT_TEST_BROKER "tcp://localhost:1883" CACHE STRING "Hostname of a test MQTT broker to use") 10 SET(MQTT_TEST_PROXY "tcp://localhost:1884" CACHE STRING "Hostname of the test proxy to use") 11 SET(MQTT_SSL_HOSTNAME "localhost" CACHE STRING "Hostname of a test SSL MQTT broker to use") 12 SET(CERTDIR $ENV{TRAVIS_BUILD_DIR}/test/ssl) 13ENDIF () 14 15include_directories(../src) 16 17ADD_EXECUTABLE( 18 test1 19 test1.c 20) 21 22TARGET_LINK_LIBRARIES( 23 test1 24 paho-embed-mqtt3c 25) 26 27ADD_TEST( 28 NAME test1 29 COMMAND "test1" "--connection" ${MQTT_TEST_BROKER} 30) 31 32SET_TESTS_PROPERTIES( 33 test1 34 PROPERTIES TIMEOUT 540 35) 36