Skip to content

Commit

Permalink
build CHANGE move -coverage from cmake config to Travis
Browse files Browse the repository at this point in the history
Seems that the -coverage option is not very portable (#17), so move
it from DEBUG build in cmake into the Travis config file, since we
codecov from Travis.
  • Loading branch information
rkrejci committed Feb 5, 2016
1 parent 9a13b9a commit f19ac67
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ before_install:
- cd cmocka-1.0.1 && mkdir build && cd build
- cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .. && make -j2 && sudo make install
- cd ../..
- if [ "${CC}" = "gcc" ]; then pip install --user codecov; fi
- if [ "${CC}" = "gcc" ]; then pip install --user codecov; export CMAKE_C_FLAGS="-coverage"; fi

script:
- mkdir build && cd build && cmake .. && make -j2 && make test
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ endif()

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -fvisibility=hidden")
set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG")
set(CMAKE_C_FLAGS_DEBUG "-coverage -g -O0")
set(CMAKE_C_FLAGS_DEBUG "-g -O0")

if(CMAKE_BUILD_TYPE STREQUAL debug)
option(ENABLE_BUILD_TESTS "Build tests" ON)
Expand Down

0 comments on commit f19ac67

Please sign in to comment.