Skip to content

Commit

Permalink
remove dependency on rmw_implementation (#102)
Browse files Browse the repository at this point in the history
* remove dependency on rmw_implementation

Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>

* fix logic in rosidl_generator_py_get_typesupports to actually set the variable passed as an argument

Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
  • Loading branch information
dirk-thomas authored Apr 10, 2020
1 parent dda5ada commit c637870
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

find_package(rmw_implementation_cmake REQUIRED)
find_package(rmw REQUIRED)
find_package(rosidl_runtime_c REQUIRED)
find_package(rosidl_typesupport_c REQUIRED)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.

macro(accumulate_typesupports)
set(_typesupport_impl "")
if(${rmw_implementation}_FOUND)
get_rmw_typesupport(_typesupport_impl ${rmw_implementation} LANGUAGE "C")
list_append_unique(_typesupport_impls ${_typesupport_impl})
endif()
endmacro()

macro(rosidl_generator_py_get_typesupports TYPESUPPORT_IMPLS)
set(TYPESUPPORT_IMPLS "")
set(_typesupport_impls "")
call_for_each_rmw_implementation(accumulate_typesupports)
foreach(_typesupport_impl ${_typesupport_impls})
list_append_unique(TYPESUPPORT_IMPLS ${_typesupport_impl})
set(${TYPESUPPORT_IMPLS} "")
ament_index_get_resources(${TYPESUPPORT_IMPLS} "rosidl_typesupport_c")
list(APPEND ${TYPESUPPORT_IMPLS} "rosidl_typesupport_c")
foreach(_typesupport ${${TYPESUPPORT_IMPLS}})
find_package(${_typesupport} QUIET)
if(NOT ${_typesupport}_FOUND)
list(REMOVE_ITEM ${TYPESUPPORT_IMPLS} "${_typesupport}")
endif()
endforeach()
endmacro()
5 changes: 1 addition & 4 deletions rosidl_generator_py/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
<buildtool_export_depend>rosidl_typesupport_interface</buildtool_export_depend>

<exec_depend>python3-numpy</exec_depend>
<exec_depend>rmw_implementation</exec_depend>
<exec_depend>rmw_implementation_cmake</exec_depend>
<exec_depend>rosidl_generator_c</exec_depend>
<exec_depend>rosidl_parser</exec_depend>
<exec_depend>rosidl_runtime_c</exec_depend>

Expand All @@ -36,8 +35,6 @@
<test_depend>python3-pytest</test_depend>
<test_depend>python_cmake_module</test_depend>
<test_depend>rmw</test_depend>
<test_depend>rmw_implementation</test_depend>
<test_depend>rmw_implementation_cmake</test_depend>
<test_depend>rosidl_cmake</test_depend>
<test_depend>rosidl_generator_c</test_depend>
<test_depend>rosidl_generator_cpp</test_depend>
Expand Down

0 comments on commit c637870

Please sign in to comment.