Skip to content

Commit

Permalink
build: add coverage instrumentation option
Browse files Browse the repository at this point in the history
  • Loading branch information
HazyFish committed Jul 8, 2024
1 parent 6e2bf83 commit 3de3b14
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions llvm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ project(LLVM
VERSION ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}
LANGUAGES C CXX ASM)

if (COVERAGE)
add_compile_options(--coverage)
add_link_options(--coverage)
endif()

if (NOT DEFINED CMAKE_INSTALL_LIBDIR AND DEFINED LLVM_LIBDIR_SUFFIX)
# Must go before `include(GNUInstallDirs)`.
set(CMAKE_INSTALL_LIBDIR "lib${LLVM_LIBDIR_SUFFIX}")
Expand Down

0 comments on commit 3de3b14

Please sign in to comment.