From 2fc93994d1dbb3febbd5428ce111f2897b723eb7 Mon Sep 17 00:00:00 2001 From: Alexey Rybalchenko Date: Mon, 12 Aug 2019 15:23:54 +0200 Subject: [PATCH] Execute test for DDS example only if DDS was found --- examples/dds/CMakeLists.txt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/examples/dds/CMakeLists.txt b/examples/dds/CMakeLists.txt index abc3db8e..d8b08990 100644 --- a/examples/dds/CMakeLists.txt +++ b/examples/dds/CMakeLists.txt @@ -37,12 +37,14 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fairmq-ex-dds-env.sh ${CMAKE_CURRENT_ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fairmq-start-ex-dds.sh.in ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-dds.sh @ONLY) # test -add_test(NAME Example.DDS.localhost COMMAND ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-dds.sh localhost) -set_tests_properties(Example.DDS.localhost PROPERTIES - TIMEOUT 15 - RUN_SERIAL true - PASS_REGULAR_EXPRESSION "Example successful" -) +if(DDS_FOUND) + add_test(NAME Example.DDS.localhost COMMAND ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-dds.sh localhost) + set_tests_properties(Example.DDS.localhost PROPERTIES + TIMEOUT 15 + RUN_SERIAL true + PASS_REGULAR_EXPRESSION "Example successful" + ) +endif() # install