File tree 4 files changed +62
-3
lines changed
4 files changed +62
-3
lines changed Original file line number Diff line number Diff line change
1
+ [submodule "cmake-modules "]
2
+ path = cmake-modules
3
+ url = https://github.com/bilke/cmake-modules.git
Original file line number Diff line number Diff line change
1
+ language : cpp
2
+ sudo : required
3
+ env :
4
+ global :
5
+ # Workaround for https://github.com/travis-ci/travis-ci/issues/4681
6
+ matrix :
7
+ - TRAVIS_EMPTY_JOB_WORKAROUND=true
8
+
9
+ matrix :
10
+ exclude :
11
+ - env : TRAVIS_EMPTY_JOB_WORKAROUND=true
12
+
13
+ include :
14
+ - os : linux
15
+ dist : trusty
16
+ env : CC=gcc-7 CXX=g++-7 BOOST_ROOT=/usr/include/boost
17
+ compiler : gcc
18
+ before_install :
19
+ - sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
20
+ - sudo apt-get update
21
+ - sudo apt-get install g++-7
22
+ - export BOOST_URL="https://downloads.sourceforge.net/project/boost/boost/1.67.0/boost_1_67_0.tar.gz"
23
+ - mkdir -p /tmp/boost
24
+ - wget --quiet -O - ${BOOST_URL} | tar --strip-components=1 -xz -C /tmp/boost || exit 1
25
+ - cd /tmp/boost/tools/build && ./bootstrap.sh && ./b2 install --prefix=/tmp/b2
26
+ - export PATH=/tmp/b2/bin:${PATH}
27
+ - cd /tmp/boost && b2 toolset=gcc cxxflags="-std=c++14 ${CXXFLAGS}"
28
+ - os : osx
29
+ osx_image : xcode9.4
30
+ env :
31
+ before_install :
32
+ - brew install lcov
33
+ after_success :
34
+ # Creating report
35
+ - cd ${TRAVIS_BUILD_DIR}
36
+ - lcov --directory . --capture --output-file coverage.info # capture coverage info
37
+ - lcov --remove coverage.info '/usr/*' --output-file coverage.info # filter out system
38
+ - lcov --list coverage.info # debug info
39
+ # Uploading report to CodeCov
40
+ - bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"
41
+
42
+ allow_failures :
43
+ - os : linux
44
+
45
+ script :
46
+ - cmake -DCMAKE_BUILD_TYPE=Debug -G "Unix Makefiles" . && make && make test
Original file line number Diff line number Diff line change 1
1
cmake_minimum_required (VERSION 3.8)
2
2
project (Boost.Real)
3
- set (Boost.Real 1)
4
- set (Boost.Real 0)
3
+ set (Boost.Real_VERSION_MAJOR 1)
4
+ set (Boost.Real_VERSION_MINOR 0)
5
5
6
- add_library (Boost.Real INTERFACE )
6
+ #Add coverage support to CMAKE in debug mode
7
+ IF (CMAKE_BUILD_TYPE MATCHES Debug)
8
+ message ("debug mode adding coverage report tools and flags" )
9
+ list (APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR} /cmake-modules" )
10
+ include (CodeCoverage)
11
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_DEBUG} -Wall -g -O0 -fprofile-arcs -ftest-coverage" )
12
+ ENDIF (CMAKE_BUILD_TYPE MATCHES Debug)
7
13
8
14
# Check for standard to use
9
15
include (CheckCXXCompilerFlag)
@@ -15,10 +21,13 @@ else()
15
21
endif ()
16
22
17
23
#Detect Boost.Test framework
24
+ set (Boost_USE_MULTITHREADED OFF )
18
25
find_package (Boost COMPONENTS unit_test_framework REQUIRED)
19
26
20
27
include_directories (include ${Boost_INCLUDE_DIRS} )
21
28
29
+ add_library (Boost.Real INTERFACE )
30
+
22
31
# Unit tests
23
32
enable_testing ()
24
33
FILE (GLOB TestSources RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} test /*_test.cpp)
You can’t perform that action at this time.
0 commit comments