Skip to content

Commit b0f4b47

Browse files
authored
Merge pull request #17 from mROS-base/fix_build_from_another_project
avoid build error when using this lib from another project
2 parents 01b5782 + 4d7eca7 commit b0f4b47

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ set(INCS "mros2/include"
3535
${CMAKE_SOURCE_DIR}/main
3636
)
3737

38+
if(NOT CMAKE_BUILD_EARLY_EXPANSION)
39+
add_compile_options(-w)
40+
endif()
41+
3842
idf_component_register(
3943
SRCS ${SRCS}
4044
INCLUDE_DIRS ${INCS}

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ idf.py build
105105
When the build completed successfully, a binary is generated in `build/echoback_string.bin`.
106106

107107
Connect the device to the host via USB cable, and flash the binary to it.
108-
The default port in Ubuntu may be `/tty/ttyUSB0``, but you may need to change it according to your environment.
108+
The port `/tty/ttyUSB0` may be adjusted according to your target board and development environment.
109109

110110
```
111111
idf.py -p /tty/ttyUSB0 flash
@@ -262,6 +262,7 @@ You need to edit `./CMakeLists.txt` and `./main/CMakeLists.txt` as the below.
262262
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
263263
project(hello_mros2)
264264
```
265+
- This is due to avoid build error about `-Werror=format` in mros2-esp32 logging functions. See [#Issue16](https://github.com/mROS-base/mros2-esp32/issues/16) for details.
265266
- `./main/CMakeLists.txt`
266267
```
267268
idf_component_register(SRCS "hello_mros2.cpp" # edit

0 commit comments

Comments
 (0)