diff --git a/arch/arc/core/CMakeLists.txt b/arch/arc/core/CMakeLists.txt index feeb9dcb28..0005aef573 100644 --- a/arch/arc/core/CMakeLists.txt +++ b/arch/arc/core/CMakeLists.txt @@ -2,11 +2,6 @@ zephyr_library() -if(CONFIG_COVERAGE) - zephyr_compile_options($) - zephyr_link_libraries($) -endif() - zephyr_library_sources( thread.c thread_entry_wrapper.S diff --git a/arch/arm/core/aarch32/CMakeLists.txt b/arch/arm/core/aarch32/CMakeLists.txt index 6c07205006..80c3e06c49 100644 --- a/arch/arm/core/aarch32/CMakeLists.txt +++ b/arch/arm/core/aarch32/CMakeLists.txt @@ -2,11 +2,6 @@ zephyr_library() -if (CONFIG_COVERAGE) - zephyr_compile_options($) - zephyr_link_libraries($) -endif () - zephyr_library_sources( swap.c swap_helper.S diff --git a/arch/arm64/core/CMakeLists.txt b/arch/arm64/core/CMakeLists.txt index e36c9a6ae7..b3d0731414 100644 --- a/arch/arm64/core/CMakeLists.txt +++ b/arch/arm64/core/CMakeLists.txt @@ -2,11 +2,6 @@ zephyr_library() -if (CONFIG_COVERAGE) - zephyr_compile_options($) - zephyr_link_libraries($) -endif () - zephyr_library_sources( cpu_idle.S fatal.c diff --git a/arch/common/CMakeLists.txt b/arch/common/CMakeLists.txt index d220ca6cf7..3f6e5984c2 100644 --- a/arch/common/CMakeLists.txt +++ b/arch/common/CMakeLists.txt @@ -52,3 +52,8 @@ if (CONFIG_GEN_ISR_TABLES) target_link_libraries(isr_tables zephyr_interface) zephyr_library_link_libraries(isr_tables) endif() + +if(CONFIG_COVERAGE) + zephyr_compile_options($) + zephyr_link_libraries($) +endif() diff --git a/arch/posix/CMakeLists.txt b/arch/posix/CMakeLists.txt index 664c7a3a3a..ddae0a787d 100644 --- a/arch/posix/CMakeLists.txt +++ b/arch/posix/CMakeLists.txt @@ -24,11 +24,6 @@ zephyr_compile_options($) zephyr_include_directories(${BOARD_DIR}) -if (CONFIG_COVERAGE) - zephyr_compile_options($) - zephyr_link_libraries($) -endif () - if (CONFIG_ASAN) zephyr_compile_options($) zephyr_link_libraries($) diff --git a/arch/x86/core/CMakeLists.txt b/arch/x86/core/CMakeLists.txt index e91bf735c7..66537c5547 100644 --- a/arch/x86/core/CMakeLists.txt +++ b/arch/x86/core/CMakeLists.txt @@ -3,11 +3,6 @@ zephyr_library() -if (CONFIG_COVERAGE) - zephyr_compile_options($) - zephyr_link_libraries($) -endif () - zephyr_library_sources(cpuhalt.c) zephyr_library_sources(prep_c.c) zephyr_library_sources(fatal.c)