Skip to content

Commit

Permalink
Updated .travis.yml and CMakeLists.txt.
Browse files Browse the repository at this point in the history
  • Loading branch information
ugnelis committed Apr 23, 2018
1 parent 3c93402 commit 1a500a7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
7 changes: 3 additions & 4 deletions .travis.yml
Expand Up @@ -32,10 +32,9 @@ script:
fi
# Build.
- mkdir build && cd build
- cmake -DCMAKE_BUILD_TYPE=Debug ..
- cmake -DCMAKE_BUILD_TYPE=Debug -DCOVERAGE=ON ..
- make
# - CTEST_OUTPUT_ON_FAILURE=1 make test
# - make project_coverage
- CTEST_OUTPUT_ON_FAILURE=1 make test

after_success:
- coveralls -r `readlink -m ./../` -e tests/ -E .+/moc_.* -E .+/qrc_.* -E .+/qxt.* -E .+/ui_.* > coveralls.log
- coveralls --root .. -e tests/ -E .+/moc_.* -E .+/qrc_.* -E .+/qxt.* -E .+/ui_.* > coveralls.log
14 changes: 9 additions & 5 deletions CMakeLists.txt
Expand Up @@ -19,13 +19,17 @@ else ()
endif ()

# Coverage.
if (CMAKE_COMPILER_IS_GNUCXX)
include(cmake/coverage.cmake)
setup_target_for_coverage(project_coverage unit_tests coverage)
option(COVERAGE "Generate coverage data" OFF)
if (COVERAGE)
if (CMAKE_COMPILER_IS_GNUCXX)
include(cmake/coverage.cmake)
setup_target_for_coverage(project_coverage unit_tests coverage)

set(CMAKE_CXX_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage")
set(CMAKE_C_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage")
endif ()
endif ()

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -pthread -g -O0 -fprofile-arcs -ftest-coverage")

# Add source folder.
add_subdirectory(src)

Expand Down

0 comments on commit 1a500a7

Please sign in to comment.