1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-13 19:40:27 +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:
Jonathan Hudson 2023-04-19 22:05:36 +01:00 committed by GitHub
parent 3f35503a74
commit f3088aeb9b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,9 +29,12 @@ set(SITL_LINK_OPTIONS
-lrt -lrt
-Wl,-L${STM32_LINKER_DIR} -Wl,-L${STM32_LINKER_DIR}
-Wl,--cref -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 set(SITL_LINK_LIBRARIS
-lpthread -lpthread
-lm -lm
@ -60,6 +63,9 @@ function(generate_map_file target)
endfunction() endfunction()
function (target_sitl name) function (target_sitl name)
if(CMAKE_VERSION VERSION_GREATER 3.22)
set(CMAKE_C_STANDARD 17)
endif()
if(NOT host STREQUAL TOOLCHAIN) if(NOT host STREQUAL TOOLCHAIN)
return() return()