File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -37,16 +37,18 @@ foreach (LANG ${ENABLED_LANGUAGES})
3737
3838 elseif ("${CMAKE_${LANG} _COMPILER_ID}" MATCHES "^(Apple)?Clang$" )
3939 # Some distributions like Debian ship llvm-cov with the compiler
40- # version appended as llvm-cov-x.y. To find this binary we'll build
40+ # version appended as llvm-cov-x.y or just llvm-cov-x . To find this binary we'll build
4141 # the suggested binary name with the compiler version.
42- string (REGEX MATCH "^[0-9]+.[0-9]+" LLVM_VERSION
42+ string (REGEX MATCH "^[0-9]+\. [0-9]+" LLVM_FULL_VERSION
43+ "${CMAKE_${LANG} _COMPILER_VERSION}" )
44+ string (REGEX MATCH "^[0-9]+" LLVM_MAJOR_VERSION
4345 "${CMAKE_${LANG} _COMPILER_VERSION}" )
4446
4547 # llvm-cov prior version 3.5 seems to be not working with coverage
4648 # evaluation tools, but these versions are compatible with the gcc
4749 # gcov tool.
48- if (LLVM_VERSION VERSION_GREATER 3.4)
49- find_program (LLVM_COV_BIN NAMES "llvm-cov-${LLVM_VERSION } "
50+ if (LLVM_FULL_VERSION VERSION_GREATER 3.4)
51+ find_program (LLVM_COV_BIN NAMES "llvm-cov-${LLVM_FULL_VERSION} " "llvm-cov- ${LLVM_MAJOR_VERSION } "
5052 "llvm-cov" HINTS ${COMPILER_PATH} )
5153 mark_as_advanced (LLVM_COV_BIN)
5254
You can’t perform that action at this time.
0 commit comments