Skip to content

Commit

Permalink
coverage option is now part of cinch
Browse files Browse the repository at this point in the history
See laristra/cinch#6 for details
  • Loading branch information
junghans committed Apr 20, 2016
1 parent 6163bff commit fd16cac
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ env: #maybe add mpich later

script:
- mkdir build && cd build &&
PATH="$HOME/bin:/usr/lib/ccache:$PATH" CC=gcc-${GVER} CXX=g++-${GVER} cmake -DENABLE_MPI=$MPI -DENABLE_INTEGRATED_TESTS=ON -DENABLE_UNIT_TESTS=ON ${COVERAGE:+-DUSE_GCOV=ON} .. &&
PATH="$HOME/bin:/usr/lib/ccache:$PATH" CC=gcc-${GVER} CXX=g++-${GVER} cmake -DENABLE_MPI=$MPI -DENABLE_INTEGRATED_TESTS=ON -DENABLE_UNIT_TESTS=ON ${COVERAGE:+-DENABLE_COVERAGE_BUILD=ON} .. &&
make -j4 && make test ARGS="-V" && make install DESTDIR="${HOME}"

after_success:
Expand Down
1 change: 0 additions & 1 deletion CMakeLists.txt

This file was deleted.

37 changes: 37 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#------------------------------------------------------------------------------#
# Copyright (c) 2016 Los Alamos National Security, LLC
# All rights reserved.
#------------------------------------------------------------------------------#

################################################################################
# Please Do Not Edit This File Unless You Know What You Are Doing!!!
#
# Project-specific configuration rules should be added in the 'config'
# subdirectory of the top-level of this project in the appropriate file,
# e.g., package configuration options should go in 'config/packages.cmake'.
#
# For more documentation on the design philosophy of this build system
# and the recognized configuration files that can be added to the 'config'
# subdirectory, please look in 'cinch/README.md' and 'cinch/INSTALL.md'
# from the top-level of this project.
#
# Any changes to the basic build template should be discussed with the
# project maintainers.
################################################################################

#------------------------------------------------------------------------------#
# Require some version of cmake
#------------------------------------------------------------------------------#

cmake_minimum_required(VERSION 3.0)

#------------------------------------------------------------------------------#
# Include project-level CMake configuration file
#------------------------------------------------------------------------------#

include(${CMAKE_SOURCE_DIR}/cinch/cmake/ProjectLists.txt)

#------------------------------------------------------------------------------#
# Formatting options for emacs and vim.
# vim: set tabstop=4 shiftwidth=4 expandtab :
#------------------------------------------------------------------------------#
2 changes: 1 addition & 1 deletion cinch
Submodule cinch updated from 6ba56e to d3e29d
4 changes: 4 additions & 0 deletions config/packages.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ if(BUILD_SHARED_LIBS)
set(VPIC_CXX_FLAGS "-rdynamic ${VPIC_CXX_FLAGS}")
endif(BUILD_SHARED_LIBS)

if(ENABLE_COVERAGE_BUILD)
set(VPIC_CXX_FLAGS "${VPIC_CXX_FLAGS} --coverage")
endif(ENABLE_COVERAGE_BUILD)

This comment has been minimized.

Copy link
@junghans

junghans Apr 20, 2016

Author Member

# process Makefile.run.in to get a simple Makefile.run for a run. Points to
# local built exe wrapper, and has example deck/platform.
configure_file(${CMAKE_SOURCE_DIR}/sample/Makefile.run.in
Expand Down
9 changes: 0 additions & 9 deletions config/project.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,6 @@ option(USE_V4_SSE "Enable V4 SSE" OFF)

option(ENABLE_OPENSSL "Enable OpenSSL support for checksums" OFF)

option(USE_GCOV "Enable gcov support" OFF)
if(USE_GCOV)
message(STATUS "Enabling gcov support")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --coverage -O0")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage -O0")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --coverage")
endif()

#------------------------------------------------------------------------------#
# Add library target
#------------------------------------------------------------------------------#
Expand Down

0 comments on commit fd16cac

Please sign in to comment.