Hi Alex,
the behavior to build multiple targets using different RMW implementations has nothing to do with `ament` itself. The CMake function `call_for_each_rmw_implementation` is provided by the `rmw` package (
https://github.com/ros2/rmw/blob/master/rmw_implementation_cmake/cmake/call_for_each_rmw_implementation.cmake). It allows to build multiple targets each linked to a different rmw implementation. Many of the example and demo packages are currently building binaries against all available rmw implementations (in your case FastRTPS and OpenSplice). If you only care about FastRTPS you could simply not install OpenSplice and FastRTPS would be your only rmw implementation.
The CMake you posted calls `call_for_each_rmw_implementation` which invokes the passed macro for each RMW implementation found. Each target is created with multiple suffixes (`${target}${target_suffix}`). And the rmw implementation is selected by linking against the specific version of the rclcpp library (`rclcpp${target_suffix}`).
In your own packages you probably don't want to create multiple targets but only use one RMW implementation. FastRTPS will be the default (based on alphabetical order). The `rclcpp` library without a suffix is being linked against the default rmw implementation available on your system. Something like this should be enough and avoids building multiple variations of each library / executable:
# no loop around this
add_executable(target ...)
ament_target_dependencies(target rclcpp ...)
Cheers,
- Dirk