我需要修改CMake场景,这样代码覆盖率报告就就位了。
为此目的,应进行2次检查:
CMAKE_COMPILER_IS_GNUCXX我的问题是:如何检查lcov是否使用CMake安装?
目标操作系统(检查条件):Ubuntu 16.04,Windows 10
发布于 2019-07-12 09:15:50
工作溶液
find_program(LCOV_BIN lcov)
IF (LCOV_BIN MATCHES "lcov$")
MESSAGE("lcov found in ${LCOV_BIN}")
ELSE ()
MESSAGE(FATAL_ERROR "lcov required, but not found!")
ENDIF ()发布于 2019-07-12 08:16:09
我觉得这可能有用
find_package(lcov)
IF (NOT lcov_FOUND)
message(FATAL_ERROR “lcov required!”)
ENDIF (NOT lcov_FOUND)https://stackoverflow.com/questions/57001218
复制相似问题