diff --git a/CMakeLists.txt b/CMakeLists.txt index d66e34e37d6fa4da84ecc99579518e472691e34c..ee83cb68528c3e75fcb25703087069140dcb1c7e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -224,7 +224,6 @@ target_link_libraries(${PROJECT_NAME} ${ChimeraTK-ControlSystemAdapter_LIBRARIES set_property(TARGET ${PROJECT_NAME} PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE) # add a target to generate API documentation with Doxygen -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/main.dox.in ${CMAKE_CURRENT_BINARY_DIR}/main.dox @ONLY) include(cmake/enable_doxygen_documentation.cmake) # Install the library and the executables diff --git a/cmake/Modules/FindDOOCS.cmake b/cmake/Modules/FindDOOCS.cmake index deb0e512a81296163f5b2c27420b2016224cc170..16fc88d985593b9c9caea8935af822281d321ffc 100644 --- a/cmake/Modules/FindDOOCS.cmake +++ b/cmake/Modules/FindDOOCS.cmake @@ -65,7 +65,7 @@ if (";${DOOCS_FIND_COMPONENTS};" MATCHES ";ddaq;") set(DOOCS_LIBRARIES ${DOOCS_LIBRARIES} DOOCSddaq timinginfo daqevstat DAQFSM TTF2XML xerces-c BM TTF2evutl) endif() -set(DOOCS_LIBRARIES ${DOOCS_LIBRARIES} DOOCSapi nsl dl pthread m rt ldap) +set(DOOCS_LIBRARIES ${DOOCS_LIBRARIES} DOOCSapi nsl dl pthread m rt ldap gul) # now set the required variables based on the determined DOOCS_DIR set(DOOCS_INCLUDE_DIRS ${DOOCS_DIR}/include) diff --git a/cmake/enable_code_coverage_report.cmake b/cmake/enable_code_coverage_report.cmake index 44c270dc484c7f7b51380130b1e2f768b91c8927..bd1b5c4156e67a92fe71eda488d574358c23f9eb 100644 --- a/cmake/enable_code_coverage_report.cmake +++ b/cmake/enable_code_coverage_report.cmake @@ -27,8 +27,11 @@ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 --coverage") -#The make coverage command is only available in debug mode -IF(CMAKE_BUILD_TYPE STREQUAL "Debug") +# The make coverage command is only available in debug mode. Also +# factor in that cmake treats CMAKE_BUILD_TYPE string as case +# insensitive. +string(TOUPPER "${CMAKE_BUILD_TYPE}" build_type_uppercase) +IF(build_type_uppercase STREQUAL "DEBUG") configure_file(cmake/make_coverage.sh.in ${PROJECT_BINARY_DIR}/make_coverage.sh @ONLY) add_custom_target(coverage @@ -36,5 +39,5 @@ IF(CMAKE_BUILD_TYPE STREQUAL "Debug") WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMENT "Generating test coverage documentation" VERBATIM ) -ENDIF(CMAKE_BUILD_TYPE STREQUAL "Debug") +ENDIF() diff --git a/cmake/main.dox.in b/doc/main.dox similarity index 100% rename from cmake/main.dox.in rename to doc/main.dox diff --git a/src/Application.cc b/src/Application.cc index 49d694399f20856256f2f183b74bd0e509118d8b..2840b781146baf07939f3b2c6fe2fea850e96921 100644 --- a/src/Application.cc +++ b/src/Application.cc @@ -169,7 +169,6 @@ void Application::run() { std::cout << module->getFullDescription() << std::endl; module->run(); } - for(auto& deviceModule : deviceModuleList) { deviceModule->run(); } @@ -197,7 +196,6 @@ void Application::shutdown() { for(auto& deviceModule : deviceModuleList) { deviceModule->terminate(); } - ApplicationBase::shutdown(); } /*********************************************************************************************************************/ @@ -474,7 +472,6 @@ void Application::makeConnections() { for(auto& devModule : deviceModuleList) { devModule->defineConnections(); } - // finalise connections: decide still-undecided details, in particular for control-system and device varibales, which // get created "on the fly". finaliseNetworks(); @@ -509,21 +506,11 @@ void Application::finaliseNetworks() { if(consumer.getDirection().withReturn) ++nBidir; } if(nBidir != 1) continue; // only if there is exactly one node with return channel we need to guess its peer - size_t nCSconsumers = 0; - for(auto& consumer : network.getConsumingNodes()) { - if(consumer.getType() == NodeType::ControlSystem) ++nCSconsumers; - } - if(network.getFeedingNode().getType() == NodeType::ControlSystem) { - network.getFeedingNode().setDirection({VariableDirection::feeding, true}); - } - else if(nCSconsumers == 1) { - for(auto& consumer : network.getConsumingNodes()) { - if(consumer.getType() == NodeType::ControlSystem) { - consumer.setDirection({VariableDirection::consuming, true}); - break; - } - } + if(network.getFeedingNode().getType() != NodeType::ControlSystem) { + // only a feeding control system variable can be made bidirectional + continue; } + network.getFeedingNode().setDirection({VariableDirection::feeding, true}); } }