Skip to content

Commit

Permalink
ignore redundent interface build
Browse files Browse the repository at this point in the history
  • Loading branch information
yswhynot committed Jun 24, 2018
1 parent 0beacf4 commit 030d660
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions rtmbuild/cmake/rtmbuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -259,11 +259,18 @@ macro(rtmbuild_genbridge)
if(NOT ${PROJECT_NAME}_autogen_interfaces)
message(AUTHOR_WARNING "[rtmbuild_genbridge] - no interface is defined")
endif()
list(APPEND interface_list "")
foreach(_comp ${${PROJECT_NAME}_autogen_interfaces})
message("[rtmbuild_genbridge] - rtmbuild_add_executable : ${_comp}ROSBridgeComp")
rtmbuild_add_executable("${_comp}ROSBridgeComp" "src_gen/${_comp}ROSBridge.cpp" "src_gen/${_comp}ROSBridgeComp.cpp")
add_custom_target(RTMBUILD_${PROJECT_NAME}_${_comp}_genbridge DEPENDS src_gen/${_comp}ROSBridge.cpp src_gen/${_comp}ROSBridgeComp.cpp)
add_dependencies(RTMBUILD_${PROJECT_NAME}_genbridge RTMBUILD_${PROJECT_NAME}_${_comp}_genbridge)
list(FIND interface_list ${_comp} _index)
if(_index EQUAL -1)
message("[rtmbuild_genbridge] - rtmbuild_add_executable : ${_comp}ROSBridgeComp")
rtmbuild_add_executable("${_comp}ROSBridgeComp" "src_gen/${_comp}ROSBridge.cpp" "src_gen/${_comp}ROSBridgeComp.cpp")
add_custom_target(RTMBUILD_${PROJECT_NAME}_${_comp}_genbridge DEPENDS src_gen/${_comp}ROSBridge.cpp src_gen/${_comp}ROSBridgeComp.cpp)
add_dependencies(RTMBUILD_${PROJECT_NAME}_genbridge RTMBUILD_${PROJECT_NAME}_${_comp}_genbridge)
list(APPEND interface_list ${_comp})
else()
message("[rtmbuild_genbridge] ${_comp} already generated.")
endif()
endforeach(_comp)

# TARGET
Expand Down

0 comments on commit 030d660

Please sign in to comment.