File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -259,11 +259,18 @@ macro(rtmbuild_genbridge)
259259 if (NOT ${PROJECT_NAME} _autogen_interfaces)
260260 message (AUTHOR_WARNING "[rtmbuild_genbridge] - no interface is defined" )
261261 endif ()
262+ list (APPEND interface_list "" )
262263 foreach (_comp ${${PROJECT_NAME} _autogen_interfaces})
263- message ("[rtmbuild_genbridge] - rtmbuild_add_executable : ${_comp} ROSBridgeComp" )
264- rtmbuild_add_executable("${_comp} ROSBridgeComp" "src_gen/${_comp} ROSBridge.cpp" "src_gen/${_comp} ROSBridgeComp.cpp" )
265- add_custom_target (RTMBUILD_${PROJECT_NAME} _${_comp} _genbridge DEPENDS src_gen/${_comp} ROSBridge.cpp src_gen/${_comp} ROSBridgeComp.cpp)
266- add_dependencies (RTMBUILD_${PROJECT_NAME} _genbridge RTMBUILD_${PROJECT_NAME} _${_comp} _genbridge)
264+ list (FIND interface_list ${_comp} _index)
265+ if (_index EQUAL -1)
266+ message ("[rtmbuild_genbridge] - rtmbuild_add_executable : ${_comp} ROSBridgeComp" )
267+ rtmbuild_add_executable("${_comp} ROSBridgeComp" "src_gen/${_comp} ROSBridge.cpp" "src_gen/${_comp} ROSBridgeComp.cpp" )
268+ add_custom_target (RTMBUILD_${PROJECT_NAME} _${_comp} _genbridge DEPENDS src_gen/${_comp} ROSBridge.cpp src_gen/${_comp} ROSBridgeComp.cpp)
269+ add_dependencies (RTMBUILD_${PROJECT_NAME} _genbridge RTMBUILD_${PROJECT_NAME} _${_comp} _genbridge)
270+ list (APPEND interface_list ${_comp} )
271+ else ()
272+ message ("[rtmbuild_genbridge] ${_comp} already generated." )
273+ endif ()
267274 endforeach (_comp)
268275
269276 # TARGET
You can’t perform that action at this time.
0 commit comments