[A] Added coveralls

This commit is contained in:
seleznevae 2018-03-18 15:32:02 +03:00
parent 757502a4b8
commit 13bba90384
2 changed files with 17 additions and 0 deletions

View File

@ -34,4 +34,16 @@ script:
- ./libfort_example - ./libfort_example
- ./libfort_test - ./libfort_test
# Build for coveralls
- if [ ${GCC_BUILD} == 'ON' ];
then
cd .. ;
rm -r build/* ;
cd build ;
cmake .. -DFORT_COVERALLS_BUILD=ON -DFORT_TEST_BUILD=ON -DFORT_GCC_BUILD=${GCC_BUILD} ;
cmake --build . --target all ;
ls ;
./libfort_test ;
fi
- cd ..

View File

@ -8,6 +8,7 @@ option(FORT_TEST_BUILD "Test build with sanitizers and small library stack size"
option(FORT_GCC_BUILD "Build with gcc" ON) option(FORT_GCC_BUILD "Build with gcc" ON)
option(FORT_MSVC_BUILD "Build with msvc" OFF) option(FORT_MSVC_BUILD "Build with msvc" OFF)
option(FORT_CXX_BUILD "Compile with c++ compiler instead of c" OFF) option(FORT_CXX_BUILD "Compile with c++ compiler instead of c" OFF)
option(FORT_COVERALLS_BUILD "Build for coveralls" OFF)
set(CMAKE_VERBOSE_MAKEFILE ON) set(CMAKE_VERBOSE_MAKEFILE ON)
@ -74,3 +75,7 @@ if(FORT_TEST_BUILD AND NOT FORT_MSVC_BUILD)
endif(FORT_GCC_BUILD) endif(FORT_GCC_BUILD)
endif(FORT_TEST_BUILD AND NOT FORT_MSVC_BUILD) endif(FORT_TEST_BUILD AND NOT FORT_MSVC_BUILD)
if(FORT_COVERALLS_BUILD) #for coveralls
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -fprofile-arcs -ftest-coverage")
endif(FORT_COVERALLS_BUILD)