mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-13 11:29:56 +03:00
[SITL] sitl specific cmake cleanup (Windows only linker option) (#8995)
* [SITL] sitl specific cmake cleanup (Windows only linker option) * [SITL] sitl specific cmake cleanup (C17 for recent cmake)
This commit is contained in:
parent
3f35503a74
commit
f3088aeb9b
1 changed files with 16 additions and 10 deletions
|
@ -29,9 +29,12 @@ set(SITL_LINK_OPTIONS
|
|||
-lrt
|
||||
-Wl,-L${STM32_LINKER_DIR}
|
||||
-Wl,--cref
|
||||
-static-libgcc # Required for windows build under cygwin
|
||||
)
|
||||
|
||||
if(${WIN32} OR ${CYGWIN})
|
||||
set(SITL_LINK_OPTIONS ${SITL_LINK_OPTIONS} "-static-libgcc")
|
||||
endif()
|
||||
|
||||
set(SITL_LINK_LIBRARIS
|
||||
-lpthread
|
||||
-lm
|
||||
|
@ -60,6 +63,9 @@ function(generate_map_file target)
|
|||
endfunction()
|
||||
|
||||
function (target_sitl name)
|
||||
if(CMAKE_VERSION VERSION_GREATER 3.22)
|
||||
set(CMAKE_C_STANDARD 17)
|
||||
endif()
|
||||
|
||||
if(NOT host STREQUAL TOOLCHAIN)
|
||||
return()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue