[mlpack-git] [mlpack/mlpack] Added test coverage framework (#720)

Ryan Curtin notifications at github.com
Tue Jul 12 14:39:11 EDT 2016


> @@ -74,6 +74,34 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
>    set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -lm")
>  endif()
>  
> +# Setup build for test coverage
> +if(BUILD_WITH_COVERAGE)
> +  # Currently coverage only works with GNU g++
> +  if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
> +    # Find gcov and lcov
> +    find_program(GCOV gcov)
> +    find_program(LCOV lcov)
> +
> +    if(NOT GCOV)
> +      message(FATAL_ERROR "gcov not found! Aborting...")
> +    endif()
> +
> +    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage -fno-inline -fno-inline-small-functions -fno-default-inline -fprofile-arcs -fkeep-inline-functions")
> +    message(WARNING "Adding debug options for coverage")

I think this should just be a `STATUS` message instead of a warning.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/720/files/ff02cb500867c83c848d69c3f85c5004b1d9fb4a#r70496696
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160712/4bf6aef9/attachment-0001.html>


More information about the mlpack-git mailing list