Skip to content

Commit

Permalink
Add support for code coverage tools
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-lunarg committed Apr 3, 2024
1 parent f60412f commit 8d768d8
Show file tree
Hide file tree
Showing 4 changed files with 680 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ cmake_minimum_required(VERSION 3.17.2)

project(VULKAN_LOADER VERSION 1.3.281 LANGUAGES C)

option(CODE_COVERAGE "Enable Code Coverage" ON)
if (CODE_COVERAGE)
include(scripts/CodeCoverage.cmake)
add_code_coverage_all_targets()
endif()


# This variable enables downstream users to customize the target API
# variant (e.g. Vulkan SC)
set(API_TYPE "vulkan")
Expand Down
4 changes: 4 additions & 0 deletions loader/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -533,3 +533,7 @@ if (PKG_CONFIG_FOUND)
configure_file("vulkan.pc.in" "vulkan.pc" @ONLY)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/vulkan.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig" RENAME "${API_TYPE}.pc")
endif()

if (CODE_COVERAGE)
target_code_coverage(vulkan AUTO ALL)
endif()
Loading

0 comments on commit 8d768d8

Please sign in to comment.