Skip to content
This repository has been archived by the owner on Aug 30, 2018. It is now read-only.

Commit

Permalink
Adding finder for lcov.
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederik Vannoote committed Feb 13, 2017
1 parent 29e0bb3 commit 51765e6
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions FindLcov.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Try to find lcov tool
#
# Cache Variables:
# LCOV_EXECUTABLE
# GENHTML_EXECUTABLE
#
# Non-cache variables you might use in your CMakeLists.txt:
# LCOV_FOUND
#
# Requires these CMake modules:
# FindPackageHandleStandardArgs (known included with CMake >=2.6.2)

if(LCOV_EXECUTABLE AND NOT EXISTS "${LCOV_EXECUTABLE}")
set(LCOV_EXECUTABLE "notfound" CACHE PATH FORCE "")
endif()

if(GENHTML_EXECUTABLE AND NOT EXISTS "${GENHTML_EXECUTABLE}")
set(GENHTML_EXECUTABLE "notfound" CACHE PATH FORCE "")
endif()

find_program(LCOV_EXECUTABLE NAMES lcov)
find_program(GENHTML_EXECUTABLE NAMES genhtml)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args( Lcov DEFAULT_MSG
LCOV_EXECUTABLE GENHTML_EXECUTABLE)

mark_as_advanced(LCOV_EXECUTABLE GENHTML_EXECUTABLE)

0 comments on commit 51765e6

Please sign in to comment.