Projects
openEuler:24.03:SP1:Everything
protobuf
_service:tar_scm:0003-protobuf-add-coverage-com...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:0003-protobuf-add-coverage-compile-option.patch of Package protobuf
From ea6d56c3518dc3af0f326f52a266bc0986d8635c Mon Sep 17 00:00:00 2001 From: zhongtao <zhongtao17@huawei.com> Date: Thu, 25 Jul 2024 21:42:22 +0800 Subject: [PATCH] protobuf: add coverage compile option Signed-off-by: zhongtao <zhongtao17@huawei.com> --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index d17f09d..0b169f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,9 @@ cmake_minimum_required(VERSION 3.10...3.26) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-z,now -fstack-check -fPIE") set(CMAKE_EXE_LINKER_FLAGS "-pie") +if (ENABLE_CONVERAGE) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage") +endif() # Revert to old behavior for MSVC debug symbols. if(POLICY CMP0141) -- 2.25.1
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2