From 83d2a47d9bacefebaa2b70dec8dd5984cf7a4c55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B8e?= Date: Mon, 6 Aug 2018 14:15:42 +0200 Subject: [PATCH] cmake: Don't propagate zephyr_library_compile_options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit zephyr_library_compile_options will apply compile options to a library with high priority. Due to bug #8438 these compile options have been applied not only to the library, but also to it's public interface and therefore to any library that has been linking with the library. To resolve #8438 we use PRIVATE linking instead of PUBLIC linking. Signed-off-by: Sebastian Bøe --- cmake/extensions.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/extensions.cmake b/cmake/extensions.cmake index d8da42de782..9a9979e70ac 100644 --- a/cmake/extensions.cmake +++ b/cmake/extensions.cmake @@ -473,7 +473,7 @@ function(zephyr_library_compile_options item) add_library( ${lib_name} INTERFACE) target_compile_options(${lib_name} INTERFACE ${item} ${ARGN}) - target_link_libraries(${ZEPHYR_CURRENT_LIBRARY} PUBLIC ${lib_name}) + target_link_libraries(${ZEPHYR_CURRENT_LIBRARY} PRIVATE ${lib_name}) endfunction() function(zephyr_library_cc_option)