mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-30 18:06:39 +08:00
Fixed clang builds on Linux
The link needed --start-group and --end-group for clang on Linux for posix builds. Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
committed by
Lorenz Meier
parent
92d0347957
commit
79b4bd60b2
@@ -10,7 +10,7 @@ add_executable(mainapp
|
|||||||
apps.h
|
apps.h
|
||||||
)
|
)
|
||||||
|
|
||||||
if (NOT ${CMAKE_C_COMPILER_ID} STREQUAL "Clang")
|
if (NOT APPLE)
|
||||||
target_link_libraries(mainapp
|
target_link_libraries(mainapp
|
||||||
-Wl,--start-group
|
-Wl,--start-group
|
||||||
${module_libraries}
|
${module_libraries}
|
||||||
@@ -18,17 +18,10 @@ if (NOT ${CMAKE_C_COMPILER_ID} STREQUAL "Clang")
|
|||||||
-Wl,--end-group
|
-Wl,--end-group
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
if (APPLE)
|
|
||||||
target_link_libraries(mainapp
|
target_link_libraries(mainapp
|
||||||
${module_libraries}
|
${module_libraries}
|
||||||
pthread m
|
pthread m
|
||||||
)
|
)
|
||||||
else()
|
|
||||||
target_link_libraries(mainapp
|
|
||||||
${module_libraries}
|
|
||||||
pthread m rt
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||||
|
|||||||
Reference in New Issue
Block a user