CMake: Update hal and platform stub CMake linker options for coverage

- Armclang is not working when we add gcov as target_link_libraries,
modified to pass as linker options with --coverage so it can work armclang and gcc
pull/14426/head
Rajkumar Kanagaraj 2021-05-11 04:27:09 -07:00
parent f096b3b3c3
commit 10625b35b1
2 changed files with 10 additions and 2 deletions

View File

@ -17,9 +17,13 @@ target_sources(mbed-stubs-hal
watchdog_api_stub.c
)
target_link_options(mbed-stubs-hal
PRIVATE
--coverage
)
target_link_libraries(mbed-stubs-hal
PRIVATE
mbed-headers
mbed-stubs-headers
gcov
)

View File

@ -18,9 +18,13 @@ target_sources(mbed-stubs-platform
randLIB_stub.cpp
)
target_link_options(mbed-stubs-platform
PRIVATE
--coverage
)
target_link_libraries(mbed-stubs-platform
PRIVATE
mbed-headers
mbed-stubs-headers
gcov
)