Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mean square distance analysis #39

Merged
merged 2 commits into from
May 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 47 additions & 42 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,75 +1,80 @@
language: cpp
sudo: false
dist: trusty

# Build matrix
os:
- linux
- osx
compiler:
- gcc
- clang

osx_image: xcode7.3

addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.6
- kalakris-cmake
packages:
- g++-4.9
- clang-3.6
- cmake
matrix:
fast_finish: true
include:
- name: linux gcc
os: linux
compiler: gcc
env: DO_COVERAGE=true
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.9
- libboost-regex-dev
- name: linux clang
os: linux
compiler: clang
addons:
apt:
packages:
- libboost-regex-dev
- name: osx gcc
os: osx
compiler: gcc
osx_image: xcode8.3
addons:
homebrew:
packages:
- gcc@6
- name: osx clang
os: osx
compiler: clang
osx_image: xcode8.3

before_install:
# Setting environement
- export C_COMPILER="$CC"
- |
if test "$TRAVIS_OS_NAME" == "linux" && test "$C_COMPILER" == "gcc"; then
export DO_COVERAGE=true
if [[ "$DO_COVERAGE" == "true" ]] ; then
export CMAKE_ARGS="-DCMAKE_CXX_FLAGS=--coverage -DCMAKE_C_FLAGS=--coverage"
pip install --user codecov
else
export DO_COVERAGE=false
fi
# Install Linux stuff
- |
if test "${TRAVIS_OS_NAME}" == "linux"; then
if test "${C_COMPILER}" == "gcc"; then
if test "$TRAVIS_OS_NAME" == "linux"; then
if test "$TRAVIS_COMPILER" == "gcc"; then
export CC=gcc-4.9
export CXX=g++-4.9
elif test "${C_COMPILER}" == "clang"; then
export CC=clang-3.6
export CXX=clang++-3.6
elif test "$TRAVIS_COMPILER" == "clang"; then
export CC=clang
export CXX=clang++
fi
fi
# Install OS X stuff
- |
if test "$TRAVIS_OS_NAME" == "osx"; then
brew tap homebrew/science
brew update
brew rm gcc
brew install gcc@5
if test "${C_COMPILER}" == "gcc"; then
export CC=gcc-5
export CXX=g++-5
elif test "${C_COMPILER}" == "clang"; then
if test "$TRAVIS_COMPILER" == "gcc"; then
export CC=gcc-6
export CXX=g++-6
elif test "$TRAVIS_COMPILER" == "clang"; then
export CC=clang
export CXX=clang++
fi
fi

script:
- cd ${TRAVIS_BUILD_DIR}
- cd $TRAVIS_BUILD_DIR
- ./scripts/check-whitespaces.py
- mkdir -p build
- cd build
- cmake -DCMAKE_BUILD_TYPE=debug $CMAKE_ARGS ..
- make
- ctest -L cfiles --output-on-failure
- |
if ${DO_COVERAGE}; then
cd ${TRAVIS_BUILD_DIR}
if [[ "$DO_COVERAGE" == "true" ]] ; then
cd $TRAVIS_BUILD_DIR
codecov --gcov-exec=gcov-4.9
fi
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ if(NOT ${STD_REGEX_WORKS})
message(STATUS "Using Boost.Regex instead of std::regex")
find_package(Boost 1.53 REQUIRED COMPONENTS regex)
target_include_directories(docopt PUBLIC ${Boost_INCLUDE_DIRS})
target_link_libraries(docopt ${Boost_LIBRARIES})
target_compile_definitions(docopt PRIVATE "-DDOCTOPT_USE_BOOST_REGEX")
target_link_libraries(libcfiles ${Boost_LIBRARIES})
endif()

if (${CFILES_USE_FFTW3})
Expand Down
2 changes: 2 additions & 0 deletions src/CommandFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "commands/HBonds.hpp"
#include "commands/Info.hpp"
#include "commands/Merge.hpp"
#include "commands/Msd.hpp"
#include "commands/Rdf.hpp"
#include "commands/Rotcf.hpp"

Expand All @@ -24,6 +25,7 @@ const std::vector<command_creator>& all_commands() {
{"hbonds", [](){return std::unique_ptr<Command>(new HBonds());}},
{"info", [](){return std::unique_ptr<Command>(new Info());}},
{"merge", [](){return std::unique_ptr<Command>(new Merge());}},
{"msd", [](){return std::unique_ptr<Command>(new MSD());}},
{"rdf", [](){return std::unique_ptr<Command>(new Rdf());}},
{"rotcf", [](){return std::unique_ptr<Command>(new Rotcf());}},
};
Expand Down
Loading