Skip to content

Commit 2f20fa7

Browse files
Acuadros95pablogs9
andauthored
Fix rolling sources (#185)
* Fix rolling sources Signed-off-by: acuadros95 <acuadros1995@gmail.com> * Remove type description Signed-off-by: acuadros95 <acuadros1995@gmail.com> * Test with debug build Signed-off-by: acuadros95 <acuadros1995@gmail.com> * Test with debug build Signed-off-by: acuadros95 <acuadros1995@gmail.com> * Test with removed debug Signed-off-by: acuadros95 <acuadros1995@gmail.com> * Test build with NDEBUG Signed-off-by: acuadros95 <acuadros1995@gmail.com> * Test with RelWithDebInfo Signed-off-by: acuadros95 <acuadros1995@gmail.com> * Test with CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE Signed-off-by: acuadros95 <acuadros1995@gmail.com> * Add assert definition Signed-off-by: acuadros95 <acuadros1995@gmail.com> * Override assert on compiler flags Signed-off-by: acuadros95 <acuadros1995@gmail.com> * Add assert override --------- Signed-off-by: acuadros95 <acuadros1995@gmail.com> Co-authored-by: Pablo Garrido <pablogs9@gmail.com>
1 parent 9914076 commit 2f20fa7

3 files changed

Lines changed: 29 additions & 17 deletions

File tree

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ foreach(package ${PACKAGES})
4343
string(REPLACE ";" "" ${package}_includes_string "${${package}_includes}")
4444
endforeach()
4545

46+
# Workaround for https://github.com/ros2/rosidl/pull/739
47+
string(APPEND IDF_INCLUDES "-I${COMPONENT_DIR}/include_override")
48+
4649
# Create a string with all packages with a for loop
4750
foreach(package ${PACKAGES})
4851
string(APPEND IDF_INCLUDES "${${package}_includes_string}")

include_override/assert.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Workaround for https://github.com/ros2/rosidl/pull/739
2+
3+
#include_next <assert.h>
4+
5+
#ifdef NDEBUG
6+
#undef assert
7+
#define assert(x) (void)0;
8+
#endif

libmicroros.mk

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ $(EXTENSIONS_DIR)/esp32_toolchain.cmake: $(EXTENSIONS_DIR)/esp32_toolchain.cmake
3737
$(EXTENSIONS_DIR)/micro_ros_dev/install:
3838
rm -rf micro_ros_dev; \
3939
mkdir micro_ros_dev; cd micro_ros_dev; \
40-
git clone -b master https://github.com/ament/ament_cmake src/ament_cmake; \
41-
git clone -b master https://github.com/ament/ament_lint src/ament_lint; \
42-
git clone -b master https://github.com/ament/ament_package src/ament_package; \
43-
git clone -b ros2 https://github.com/ament/googletest src/googletest; \
44-
git clone -b master https://github.com/ros2/ament_cmake_ros src/ament_cmake_ros; \
45-
git clone -b master https://github.com/ament/ament_index src/ament_index; \
40+
git clone -b rolling https://github.com/ament/ament_cmake src/ament_cmake; \
41+
git clone -b rolling https://github.com/ament/ament_lint src/ament_lint; \
42+
git clone -b rolling https://github.com/ament/ament_package src/ament_package; \
43+
git clone -b rolling https://github.com/ament/googletest src/googletest; \
44+
git clone -b rolling https://github.com/ros2/ament_cmake_ros src/ament_cmake_ros; \
45+
git clone -b rolling https://github.com/ament/ament_index src/ament_index; \
4646
colcon build --cmake-args -DBUILD_TESTING=OFF -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=gcc;
4747

4848
$(EXTENSIONS_DIR)/micro_ros_src/src:
@@ -62,17 +62,18 @@ $(EXTENSIONS_DIR)/micro_ros_src/src:
6262
git clone -b main https://github.com/micro-ROS/micro_ros_msgs src/micro_ros_msgs; \
6363
git clone -b master https://github.com/micro-ROS/rosidl_typesupport src/rosidl_typesupport; \
6464
git clone -b main https://github.com/micro-ROS/rosidl_typesupport_microxrcedds src/rosidl_typesupport_microxrcedds; \
65-
git clone -b master https://github.com/ros2/rosidl src/rosidl; \
66-
git clone -b master https://github.com/ros2/rmw src/rmw; \
67-
git clone -b master https://github.com/ros2/rcl_interfaces src/rcl_interfaces; \
68-
git clone -b master https://github.com/ros2/rosidl_defaults src/rosidl_defaults; \
69-
git clone -b master https://github.com/ros2/unique_identifier_msgs src/unique_identifier_msgs; \
70-
git clone -b master https://github.com/ros2/common_interfaces src/common_interfaces; \
71-
git clone -b master https://github.com/ros2/example_interfaces src/example_interfaces; \
72-
git clone -b master https://github.com/ros2/test_interface_files src/test_interface_files; \
73-
git clone -b master https://github.com/ros2/rmw_implementation src/rmw_implementation; \
74-
git clone -b master https://github.com/ros2/rcl_logging src/rcl_logging; \
75-
git clone -b master https://github.com/ros2/ros2_tracing src/ros2_tracing; \
65+
git clone -b rolling https://github.com/ros2/rosidl src/rosidl; \
66+
git clone -b rolling https://github.com/ros2/rosidl_dynamic_typesupport src/rosidl_dynamic_typesupport; \
67+
git clone -b rolling https://github.com/ros2/rmw src/rmw; \
68+
git clone -b rolling https://github.com/ros2/rcl_interfaces src/rcl_interfaces; \
69+
git clone -b rolling https://github.com/ros2/rosidl_defaults src/rosidl_defaults; \
70+
git clone -b rolling https://github.com/ros2/unique_identifier_msgs src/unique_identifier_msgs; \
71+
git clone -b rolling https://github.com/ros2/common_interfaces src/common_interfaces; \
72+
git clone -b rolling https://github.com/ros2/example_interfaces src/example_interfaces; \
73+
git clone -b rolling https://github.com/ros2/test_interface_files src/test_interface_files; \
74+
git clone -b rolling https://github.com/ros2/rmw_implementation src/rmw_implementation; \
75+
git clone -b rolling https://github.com/ros2/rcl_logging src/rcl_logging; \
76+
git clone -b rolling https://github.com/ros2/ros2_tracing src/ros2_tracing; \
7677
git clone -b main https://github.com/micro-ROS/micro_ros_utilities src/micro_ros_utilities; \
7778
git clone -b rolling https://github.com/ros2/rosidl_core src/rosidl_core; \
7879
touch src/rosidl/rosidl_typesupport_introspection_cpp/COLCON_IGNORE; \

0 commit comments

Comments
 (0)