Skip to content

Commit 9a79644

Browse files
committed
Rename UMF_USE_GCOV to UMF_USE_COVERAGE
Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
1 parent 673b844 commit 9a79644

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ option(UMF_USE_UBSAN "Enable UndefinedBehaviorSanitizer checks" OFF)
7171
option(UMF_USE_TSAN "Enable ThreadSanitizer checks" OFF)
7272
option(UMF_USE_MSAN "Enable MemorySanitizer checks" OFF)
7373
option(UMF_USE_VALGRIND "Enable Valgrind instrumentation" OFF)
74-
option(UMF_USE_GCOV "Enable gcov support" OFF)
74+
option(UMF_USE_COVERAGE "Build with coverage enabled (Linux only)" OFF)
7575

7676
# set UMF_PROXY_LIB_BASED_ON_POOL to one of: SCALABLE or JEMALLOC
7777
set(KNOWN_PROXY_LIB_POOLS SCALABLE JEMALLOC)

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,12 +209,12 @@ origin: https://dependency_origin.com
209209
## Code coverage
210210

211211
After adding a new functionality add tests and check coverage before and after the change.
212-
To do this, enable coverage instrumentation by turning on the UMF_USE_GCOV flag in CMake.
212+
To do this, enable coverage instrumentation by turning on the UMF_USE_COVERAGE flag in CMake.
213213
Coverage instrumentation feature is supported only by GCC and Clang.
214214
An example flow might look like the following:
215215

216216
```bash
217-
$ cmake -B build -DUMF_USE_GCOV=1 -DCMAKE_BUILD_TYPE=Debug
217+
$ cmake -B build -DUMF_USE_COVERAGE=1 -DCMAKE_BUILD_TYPE=Debug
218218
$ cmake --build build -j
219219
$ cd build
220220
$ ctest

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ List of options provided by CMake:
119119
| UMF_USE_TSAN | Enable ThreadSanitizer checks | ON/OFF | OFF |
120120
| UMF_USE_MSAN | Enable MemorySanitizer checks | ON/OFF | OFF |
121121
| UMF_USE_VALGRIND | Enable Valgrind instrumentation | ON/OFF | OFF |
122-
| UMF_USE_GCOV | Enable gcov support (Linux only) | ON/OFF | OFF |
122+
| UMF_USE_COVERAGE | Build with coverage enabled (Linux only) | ON/OFF | OFF |
123123
| UMF_LINK_HWLOC_STATICALLY | Link UMF with HWLOC library statically (Windows+Release only) | ON/OFF | OFF |
124124
| UMF_DISABLE_HWLOC | Disable features that requires hwloc (OS provider, memory targets, topology discovery) | ON/OFF | OFF |
125125

cmake/helpers.cmake

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,12 @@ function(add_umf_target_compile_options name)
247247
target_compile_options(${name} PRIVATE -fno-omit-frame-pointer
248248
-fstack-protector-strong)
249249
endif()
250-
if(UMF_USE_GCOV)
250+
if(UMF_USE_COVERAGE)
251251
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
252-
message(FATAL_ERROR "To use gcov, the build type must be Debug")
252+
message(
253+
FATAL_ERROR
254+
"To use the --coverage flag, the build type must be Debug"
255+
)
253256
endif()
254257
target_compile_options(${name} PRIVATE --coverage)
255258
endif()
@@ -283,10 +286,12 @@ function(add_umf_target_link_options name)
283286
if(NOT MSVC)
284287
if(NOT APPLE)
285288
target_link_options(${name} PRIVATE "LINKER:-z,relro,-z,now")
286-
if(UMF_USE_GCOV)
289+
if(UMF_USE_COVERAGE)
287290
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
288291
message(
289-
FATAL_ERROR "To use gcov, the build type must be Debug")
292+
FATAL_ERROR
293+
"To use the --coverage flag, the build type must be Debug"
294+
)
290295
endif()
291296
target_link_options(${name} PRIVATE --coverage)
292297
endif()

0 commit comments

Comments
 (0)