1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-12 19:10:27 +03:00

add option to build sitl with debug information

This commit is contained in:
Roman Lut 2023-10-07 17:52:37 +02:00
parent 9239b5df06
commit 79e14749d5
2 changed files with 7 additions and 1 deletions

View file

@ -1,6 +1,7 @@
#!/bin/bash
rm -r build_SITL
mkdir -p build_SITL
cmake -DSITL=ON -DWARNINGS_AS_ERRORS=ON -GNinja -B build_SITL ..
#cmake -DSITL=ON -DWARNINGS_AS_ERRORS=ON -GNinja -B build_SITL ..
cmake -DSITL=ON -DDEBUG=ON -DWARNINGS_AS_ERRORS=ON -GNinja -B build_SITL ..
cd build_SITL
ninja

View file

@ -53,6 +53,11 @@ set(SITL_COMPILE_OPTIONS
-funsigned-char
)
if(DEBUG)
message(STATUS "Debug mode enabled. Adding -g to SITL_COMPILE_OPTIONS.")
list(APPEND SITL_COMPILE_OPTIONS -g)
endif()
if(NOT MACOSX)
set(SITL_COMPILE_OPTIONS ${SITL_COMPILE_OPTIONS}
-Wno-return-local-addr