How to use C# msbuild/xbuild system with ament?

67 views
Skip to first unread message

Lennart Na

unread,
Sep 8, 2016, 6:55:01 PM9/8/16
to ROS SIG NG ROS
Hi,
I'm looking for some information/documentation and examples on how to integrate the msbuild/xbuild system that is usually used with C#, into ament.
According to http://design.ros2.org/articles/ament.html this should be possible.

At the moment I'm simply using a cmake custom target that invokes the xbuild system on linux. ( See https://github.com/firesurfer/rclcs/blob/master/CMakeLists.txt )

What I want to achieve is:
  • Calling msbuild/xbuild directly or with a nice looking call from cmake
  • Export the resulting dll's / exe's by the setup script that is created in the install folder by ament so you don't need to go into the install/bin folder
  • Export/set the environment variable MONO_PATH (On Windows I think you should use an application config file)

Lennart

Dirk Thomas

unread,
Sep 15, 2016, 12:03:19 PM9/15/16
to ROS SIG NG ROS
Hi Lennart,

wrapping the `xbuild` invocation in a CMake project is certainly an option. It just implies that you need CMake which you don't really use and which adds some overhead to the build of that package.

A cleaner way would be to introduce a new build type to `ament_tools`, e.g. `xbuild` (https://github.com/ament/ament_tools/blob/24a11a523cf900ce3880c62ed79127cc2177a4a4/setup.py#L51-L55). Currently the tool only knows how to process CMake and Python packages (https://github.com/ament/ament_tools/tree/master/ament_tools/build_types) but it can be easily extended to support arbitrary other tools. Each of the build type files simply implements the process you want to apply when building / testing / installing / uninstalling a package. By implementing support for `xbuild` in `ament_tools` you gain the option to pass optional `xbuild` specific arguments from the command line. E.g. for CMake you can specify CTest specific argument to customize the testing process.

Cheers,
- Dirk



--
You received this message because you are subscribed to the Google Groups "ROS SIG NG ROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ros-sig-ng-ros+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages