From fd16cac945de647c16557e50791069e832ff7f1f Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Wed, 20 Apr 2016 15:40:21 -0600 Subject: [PATCH] coverage option is now part of cinch See losalamos/cinch#6 for details --- .travis.yml | 2 +- CMakeLists.txt | 38 +++++++++++++++++++++++++++++++++++++- cinch | 2 +- config/packages.cmake | 4 ++++ config/project.cmake | 9 --------- 5 files changed, 43 insertions(+), 12 deletions(-) mode change 120000 => 100644 CMakeLists.txt diff --git a/.travis.yml b/.travis.yml index 22c5b7dc..6de7097a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 120000 index 021f40eb..00000000 --- a/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -cinch/cmake/ProjectLists.txt \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 00000000..537f4656 --- /dev/null +++ b/CMakeLists.txt @@ -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 : +#------------------------------------------------------------------------------# diff --git a/cinch b/cinch index 6ba56ee4..d3e29ddb 160000 --- a/cinch +++ b/cinch @@ -1 +1 @@ -Subproject commit 6ba56ee4f4f45c8ef62c86e5fedc620b3b562477 +Subproject commit d3e29ddb7f762db4fa50dd54ac85efc2a9e606c7 diff --git a/config/packages.cmake b/config/packages.cmake index ec5673ea..f50fca61 100644 --- a/config/packages.cmake +++ b/config/packages.cmake @@ -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) + # 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 diff --git a/config/project.cmake b/config/project.cmake index ea9c8eaf..e47ad417 100644 --- a/config/project.cmake +++ b/config/project.cmake @@ -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 #------------------------------------------------------------------------------#