# Allow exceptions for cxxopts and paho.mqtt.cpp by removing restricting flag. if ( ROSA_COMPILER_IS_GCC_COMPATIBLE ) remove("-fno-exceptions" CMAKE_CXX_FLAGS) endif() # Allow warnings for paho.mqtt.cpp if ( ROSA_COMPILER_IS_GCC_COMPATIBLE ) remove("-Werror" CMAKE_CXX_FLAGS) elseif ( MSVC ) remove("/WX" CMAKE_CXX_FLAGS) endif() add_executable(mqtt-client mqtt-client.cpp) ROSA_add_library_dependencies(mqtt-client ROSAConfig) ROSA_add_library_dependencies(mqtt-client ROSASupport) ROSA_add_library_dependencies(mqtt-client paho-mqttpp3) ROSA_add_library_dependencies(mqtt-client paho-mqttc3::MQTTAsync)