Skip to content

Commit

Permalink
Merge de882cb into 9aa3962
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreLouisCaron committed Dec 30, 2015
2 parents 9aa3962 + de882cb commit 4f2d8bd
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@ script:
- make test
# Build docs.
- ./env/bin/sphinx-build -b html ../docs/ docs/

after_success:
- ./env/bin/coveralls -r .. -b . -e build/env/ -E '.*CMakeCXXCompilerId\.cpp' -E '.*CMakeCCompilerId\.c' -E '.*feature_tests.c' -E '.*feature_tests.cxx'
14 changes: 14 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,24 @@ cmake_minimum_required(VERSION 2.8)
project(green)

option(GREEN_TESTS "Compile the test suite." ON)
option(GREEN_GCOV "Compute code coverage." OFF)

if (GREEN_GCOV)
message(STATUS "Code coverage enabled.")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 --coverage" CACHE STRING "..." FORCE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 --coverage" CACHE STRING "..." FORCE)
set(CMAKE_STATIC_LINKER_FLAGS="--coverage" CACHE STRING "..." FORCE)
set(CMAKE_MODULE_LINKER_FLAGS="--coverage" CACHE STRING "..." FORCE)
set(CMAKE_EXE_LINKER_FLAGS="--coverage" CACHE STRING "..." FORCE)
endif()

# Relative paths make __FILE__ more readable.
set(CMAKE_USE_RELATIVE_PATHS TRUE)

# Output everything nearby for convenience.
set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR})
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR})

include_directories("${PROJECT_SOURCE_DIR}/include")

add_library(green
Expand Down
1 change: 1 addition & 0 deletions doc_requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
sphinx
cpp-coveralls

0 comments on commit 4f2d8bd

Please sign in to comment.