diff --git a/CMakeLists.txt b/CMakeLists.txt index 4663047..7b2c4eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,6 +6,7 @@ set(CMAKE_VERBOSE_MAKEFILE ON) option(BUILD_UNITTEST "Build unittest" OFF) option(BUILD_DEMO "Build demo" ON) option(BUILD_SHARED_LIB "Build shared library" OFF) +option(ENABLE_COVERAGE "Enable Coverage" OFF) if(APPLE) set(OS_TYPE "APPLE") @@ -71,6 +72,11 @@ else() set(SYSTEM_LIBS stdc++ pthread) endif() +if(ENABLE_COVERAGE) +# coverage option +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage") +endif() + add_subdirectory(src) if(BUILD_UNITTEST) diff --git a/gen_lcov.sh b/gen_lcov.sh index a04a384..eff79ca 100755 --- a/gen_lcov.sh +++ b/gen_lcov.sh @@ -1,7 +1,7 @@ #!/bin/sh workspace=`pwd` -EXTRACT="${workspace}/*/op/* ${workspace}/*/util/* ${workspace}/*/request/* ${workspace}/*/response/* ${workspace}/include" +EXTRACT="${workspace}/src ${workspace}/include" # clear rm UTReport -rf rm UTResport.tar diff --git a/include/cos_defines.h b/include/cos_defines.h index 407f6d6..c1094e0 100644 --- a/include/cos_defines.h +++ b/include/cos_defines.h @@ -11,7 +11,7 @@ namespace qcloud_cos { -#define COS_CPP_SDK_VERSON "v5.5.9" +#define COS_CPP_SDK_VERSON "v5.5.10" /// 路径分隔符 const std::string kPathDelimiter = "/";