diff options
author | John Levon <john.levon@nutanix.com> | 2021-05-25 15:09:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-25 15:09:03 +0100 |
commit | df72df510f4696fb4835fd42e8f4de2dcb7cf428 (patch) | |
tree | 52f70c075cf9d1794a5c480535fffb091d23e094 /CMakeLists.txt | |
parent | 6e8ffd28978f068741122f7894780f614e85ff12 (diff) | |
download | libvfio-user-df72df510f4696fb4835fd42e8f4de2dcb7cf428.zip libvfio-user-df72df510f4696fb4835fd42e8f4de2dcb7cf428.tar.gz libvfio-user-df72df510f4696fb4835fd42e8f4de2dcb7cf428.tar.bz2 |
add a gcov target (#498)
"make gcov" is sufficient to run the tests in DEBUG mode and generate gcov
output for each .c file in lib/, to give us some idea of our coverage.
Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 8715625..10086ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,6 +39,9 @@ include(GNUInstallDirs) find_package(PkgConfig REQUIRED) pkg_check_modules(JSON REQUIRED json-c) +# for the benefit of the gcov rules +set(CMAKE_C_OUTPUT_EXTENSION_REPLACE 1) + include_directories(${CMAKE_SOURCE_DIR}/include) include_directories(${CMAKE_SOURCE_DIR}/lib) include_directories(${JSON_INCLUDE_DIRS}) |