Skip to content

Commit

Permalink
Fixing Code Cov for CodeCov.io (#22)
Browse files Browse the repository at this point in the history
* added coverage to VPIC_CXX_FLAG, and added VPIC_CXX_FLAGS to CMAKE_CXX_FLAGS
* Added code cov ignore file
  • Loading branch information
rfbird authored Sep 24, 2018
1 parent c188cca commit 690443d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ignore:
- "/test/include"
8 changes: 2 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,6 @@ option(ENABLE_OPENSSL "Enable OpenSSL support for checksums" OFF)
# NOTE: These must be set before creating the compile scripts below.
#------------------------------------------------------------------------------#

set(VPIC_CPPFLAGS)
if(MPI_CPPFLAGS)
string(REPLACE ";" " " string_cppflags "${MPI_CPPFLAGS}")
set(VPIC_CPPFLAGS "${string_cppflags}")
endif(MPI_CPPFLAGS)

string(REPLACE ";" " -I" string_includes "${MPI_C_INCLUDE_PATH}")
if(NOT ${string_includes} STREQUAL "")
set(VPIC_CXX_FLAGS "-I${string_includes} ${MPI_C_LINK_FLAGS}")
Expand Down Expand Up @@ -169,6 +163,8 @@ file(COPY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/vpic
# Add library target
#------------------------------------------------------------------------------#

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${VPIC_CXX_FLAGS}")

file(GLOB_RECURSE VPIC_SRC src/*.c src/*.cc)
file(GLOB_RECURSE VPIC_NOT_SRC src/util/v4/test/v4.cc src/util/rng/test/rng.cc)
list(REMOVE_ITEM VPIC_SRC ${VPIC_NOT_SRC})
Expand Down
4 changes: 2 additions & 2 deletions bin/vpic.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

deck=`echo $1 | sed 's,\.cxx,,g;s,\.cc,,g;s,\.cpp,,g;s,.*\/,,g'`

echo "${CMAKE_CXX_COMPILER} ${VPIC_CPPFLAGS} ${CMAKE_CXX_FLAGS} -I. -I${CMAKE_INSTALL_PREFIX}/include/vpic ${VPIC_CXX_FLAGS} -DINPUT_DECK=$1 ${CMAKE_INSTALL_PREFIX}/share/vpic/main.cc ${CMAKE_INSTALL_PREFIX}/share/vpic/wrapper.cc -o $deck.${CMAKE_SYSTEM_NAME} -Wl,-rpath,${CMAKE_INSTALL_PREFIX}/lib -L${CMAKE_INSTALL_PREFIX}/lib -lvpic ${VPIC_CXX_LIBRARIES} -lpthread -ldl"
echo "${CMAKE_CXX_COMPILER} ${CMAKE_CXX_FLAGS} -I. -I${CMAKE_INSTALL_PREFIX}/include/vpic -DINPUT_DECK=$1 ${CMAKE_INSTALL_PREFIX}/share/vpic/main.cc ${CMAKE_INSTALL_PREFIX}/share/vpic/wrapper.cc -o $deck.${CMAKE_SYSTEM_NAME} -Wl,-rpath,${CMAKE_INSTALL_PREFIX}/lib -L${CMAKE_INSTALL_PREFIX}/lib -lvpic ${VPIC_CXX_LIBRARIES} -lpthread -ldl"

${CMAKE_CXX_COMPILER} ${VPIC_CPPFLAGS} ${CMAKE_CXX_FLAGS} -I. -I${CMAKE_INSTALL_PREFIX}/include/vpic ${VPIC_CXX_FLAGS} -DINPUT_DECK=$1 ${CMAKE_INSTALL_PREFIX}/share/vpic/main.cc ${CMAKE_INSTALL_PREFIX}/share/vpic/wrapper.cc -o $deck.${CMAKE_SYSTEM_NAME} -Wl,-rpath,${CMAKE_INSTALL_PREFIX}/lib -L${CMAKE_INSTALL_PREFIX}/lib -lvpic ${VPIC_CXX_LIBRARIES} -lpthread -ldl
${CMAKE_CXX_COMPILER} ${CMAKE_CXX_FLAGS} -I. -I${CMAKE_INSTALL_PREFIX}/include/vpic -DINPUT_DECK=$1 ${CMAKE_INSTALL_PREFIX}/share/vpic/main.cc ${CMAKE_INSTALL_PREFIX}/share/vpic/wrapper.cc -o $deck.${CMAKE_SYSTEM_NAME} -Wl,-rpath,${CMAKE_INSTALL_PREFIX}/lib -L${CMAKE_INSTALL_PREFIX}/lib -lvpic ${VPIC_CXX_LIBRARIES} -lpthread -ldl

0 comments on commit 690443d

Please sign in to comment.