Replies: 3 comments 1 reply
-
I actually just noticed this line in foreign rules cc https://github.com/bazelbuild/rules_foreign_cc/blob/816905a078773405803e86635def78b61d2f782d/foreign_cc/cmake.bzl#L208 Seems like we should not force set Use |
Beta Was this translation helpful? Give feedback.
-
If you have a bit of time, please open a PR and clean up CMAKE_BUILD_TYPE occurrences. |
Beta Was this translation helpful? Give feedback.
-
BTW, if you want to run a target under gdb, do: |
Beta Was this translation helpful? Give feedback.
-
I have had to run some debugging in the investigation of this issue ros2/rmw_fastrtps#703. To do that I had to do some changes like adding a debug flag to control Cmake properties like CMAKE_BUILD_TYPE.
I think this could be useful to add support for. In essence, what is needed is to adapt the Cmake built libraries with a custom flag since I am not sure there is another way to control that via the build command.
See this example:
https://github.com/henriksod/rules_ros2/blob/feature/debug
Adds
bazel build ... --config=debug
.Then I run gdb on the produced binaries like:
AMENT_PREFIX_PATH="generic_publisher_tests_launch_ament_setup" gdb generic_publisher_tests_impl
Beta Was this translation helpful? Give feedback.
All reactions