mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-13 03:19:58 +03:00
add option to build sitl with debug information
This commit is contained in:
parent
9239b5df06
commit
79e14749d5
2 changed files with 7 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
rm -r build_SITL
|
rm -r build_SITL
|
||||||
mkdir -p 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
|
cd build_SITL
|
||||||
ninja
|
ninja
|
|
@ -53,6 +53,11 @@ set(SITL_COMPILE_OPTIONS
|
||||||
-funsigned-char
|
-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)
|
if(NOT MACOSX)
|
||||||
set(SITL_COMPILE_OPTIONS ${SITL_COMPILE_OPTIONS}
|
set(SITL_COMPILE_OPTIONS ${SITL_COMPILE_OPTIONS}
|
||||||
-Wno-return-local-addr
|
-Wno-return-local-addr
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue