Added local coverage tools.

This commit is contained in:
jgoppert
2015-11-04 11:38:55 -05:00
parent edc356d0db
commit 9e37b99d76
4 changed files with 17 additions and 6 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
language: c
script:
- mkdir -p build && cd build && cmake -DCOVERALLS=ON -DCMAKE_BUILD_TYPE=Debug .. &&
- mkdir -p build && cd build && cmake -DCOVERALLS=ON -DCOVERALLS_UPLOAD=ON -DCMAKE_BUILD_TYPE=Debug .. &&
make && ctest -V && make coveralls
env:
global:
+11 -4
View File
@@ -7,7 +7,7 @@ set(VERSION_PATCH "0")
project(matrix CXX)
option(COVERALLS "Turn on coveralls support" OFF)
option(COVERALLS_UPLOAD "Upload the generated coveralls json" ON)
option(COVERALLS_UPLOAD "Upload the generated coveralls json" OFF)
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build type" FORCE)
@@ -26,14 +26,21 @@ set(CMAKE_CXX_FLAGS
)
if (COVERALLS)
include(Coveralls)
coveralls_turn_on_coverage()
list(APPEND CMAKE_CXX_FLAGS
-fno-inline
-fno-inline-small-functions
-fno-default-inline
--coverage
)
include(Coveralls)
coveralls_turn_on_coverage()
add_custom_target(coverage
COMMAND lcov --capture --directory . --output-file coverage.info
COMMAND genhtml coverage.info --output-directory out
COMMAND firefox out/index.html
WORKING_DIRECTORY ${CMAKE_BUILD_DIR}
DEPENDS coveralls
)
endif()
string(REPLACE ";" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
@@ -42,7 +49,7 @@ enable_testing()
include_directories(matrix)
file(GLOB_RECURSE COV_SRCS matrix/*.hpp matrix/*.cpp)
file(GLOB_RECURSE COV_SRCS matrix/*.hpp matrix/*.cpp test/*.hpp test/*.cpp)
# Setup the coveralls target and tell it to gather
# coverage data for all the lib sources.
+1 -1
View File
@@ -88,7 +88,7 @@ public:
return r;
}
Matrix<Type, 4, 1> derivative(const Matrix<Type, 3, 1> & w) const {
Matrix<Type, 4, 1> derivative(const Vector<Type, 3> & w) const {
const Quaternion &q = *this;
Type dataQ[] = {
q(0), -q(1), -q(2), -q(3),
+4
View File
@@ -10,8 +10,12 @@
namespace matrix {
template class Vector<float, 2>;
template class Vector<float, 3>;
template class Vector<float, 4>;
template class Euler<float>;
template class Scalar<float>;
template class Matrix<float, 3, 3>;
template class Matrix<float, 1, 1>;
template class Quaternion<float>;
};