From 452bfb36de45da4a37e97772e4bef01f488c2d53 Mon Sep 17 00:00:00 2001 From: PengZheng Date: Thu, 14 Dec 2023 15:30:19 +0800 Subject: [PATCH] Make gcov play nicely with Conan2. `tc.cache_variables["CMAKE_EXE_LINKER_FLAGS"] = "-Wl,--unresolved-symbols=ignore-in-shared-libs"` would be overriden previously. --- cmake/celix_project/CodeCoverage.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/celix_project/CodeCoverage.cmake b/cmake/celix_project/CodeCoverage.cmake index aa33308e9..7615b38fc 100644 --- a/cmake/celix_project/CodeCoverage.cmake +++ b/cmake/celix_project/CodeCoverage.cmake @@ -70,8 +70,8 @@ IF(ENABLE_CODE_COVERAGE) # Setup compiler options ADD_DEFINITIONS(--coverage) - set(CMAKE_SHARED_LINKER_FLAGS "--coverage") - set(CMAKE_EXE_LINKER_FLAGS "--coverage") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --coverage") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage") IF(NOT TARGET coverage) add_custom_target(coverage