From 79b4bd60b2fa18e073fe3aa95ab135f94855a3b7 Mon Sep 17 00:00:00 2001 From: Mark Charlebois Date: Mon, 19 Oct 2015 14:46:18 -0700 Subject: [PATCH] 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 --- src/firmware/posix/CMakeLists.txt | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/firmware/posix/CMakeLists.txt b/src/firmware/posix/CMakeLists.txt index 7c30f1dfa6..2c7074ed33 100644 --- a/src/firmware/posix/CMakeLists.txt +++ b/src/firmware/posix/CMakeLists.txt @@ -10,7 +10,7 @@ add_executable(mainapp apps.h ) -if (NOT ${CMAKE_C_COMPILER_ID} STREQUAL "Clang") +if (NOT APPLE) target_link_libraries(mainapp -Wl,--start-group ${module_libraries} @@ -18,17 +18,10 @@ if (NOT ${CMAKE_C_COMPILER_ID} STREQUAL "Clang") -Wl,--end-group ) else() - if (APPLE) - target_link_libraries(mainapp - ${module_libraries} - pthread m - ) - else() - target_link_libraries(mainapp - ${module_libraries} - pthread m rt - ) - endif() + target_link_libraries(mainapp + ${module_libraries} + pthread m + ) endif() # vim: set noet ft=cmake fenc=utf-8 ff=unix :