Skip to content

Commit

Permalink
Merge pull request #36 from DCM-UPB/polish
Browse files Browse the repository at this point in the history
unmerged changes + polish
  • Loading branch information
Ithanil authored Feb 24, 2019
2 parents d813768 + 3fa5dff commit 2c03fa4
Show file tree
Hide file tree
Showing 259 changed files with 1,042 additions and 2,813 deletions.
86 changes: 6 additions & 80 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -- Mac OS files (from github's Global/OSX.gitignore) --
<# -- Mac OS files (from github's Global/OSX.gitignore) --
.DS_Store
.AppleDouble
.LSOverride
Expand Down Expand Up @@ -58,85 +58,13 @@ xcuserdata
DerivedData
*.xcuserstate

# -- Automake files (http://www.gnu.org/software/automake)

Makefile
Makefile.in
.libs
.dirstamp
test-suite.log
/ar-lib
/mdate-sh
/py-compile
/test-driver
/ylwrap

# --- Autoconf files (http://www.gnu.org/software/autoconf)

aminclude_static.am
config.h
config.h.in
config.h.in~
config.log
config.status
.deps
autom4te.cache
/autoscan.log
/autoscan-*.log
/aclocal.m4
/compile
/config.guess
/config.h.in
/config.sub
/configure
/configure.scan
/depcomp
/install-sh
/missing
/stamp-h1

# --- Files added by autoreconf -i

/ltmain.sh
libtool
COPYING
INSTALL

# --- Texinfo files (http://www.gnu.org/software/texinfo)

/texinfo.tex

# --- M4 files (http://www.gnu.org/software/m4)

m4/libtool.m4
m4/ltoptions.m4
m4/ltsugar.m4
m4/ltversion.m4
m4/lt~obsolete.m4

# -- project specific ignores --
lib*
build
config.sh
exe
exe.prof*
vgcore*
*.o
*.dSYM
*.swp
*.swo
*.gcno
*.lo
*.la
*.gcda
*.log
*.trs
vgcore*

test/*.txt
test/ut*/*.txt

benchmark/*/benchmark_*.out

examples/*/*.txt
examples/*/*/*.txt
benchmark/*/*.out

doc/*.aux
doc/*.dvi
Expand All @@ -149,8 +77,6 @@ doc/*.fdb_latexmk
doc/*.fls
doc/*.ilg
doc/*.ind
doc/*.lb
doc/auto

doc/doxygen/*/*
!doc/doxygen/doxygen.conf
!doc/doxygen/doxygen.html
90 changes: 55 additions & 35 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,73 +1,93 @@
sudo: required
dist: trusty
dist: xenial
language: c++
services:
- docker

addons:
apt:
packages:
- valgrind
- libgsl-dev

homebrew:
packages:
- valgrind
- gsl

matrix:
include:
#- os: linux
# env:
# - MATRIX_EVAL="wget ftp://ftp.gnu.org/gnu/gsl/gsl-2.3.tar.gz && tar -xvf gsl-2.3.tar.gz && cd gsl-2.3 && ./configure && make -j2 && sudo make install && cd ../ && export LDFLAGS=-L/usr/local/lib && export CPPFLAGS=-I/usr/local/include"
# - USE_DOCKER="FALSE"
# - USE_GCOV="FALSE"

- os: linux // arch linux docker
env:
- MYCXX="g++"
- USE_DOCKER="TRUE"
- USE_OPENMP="FALSE"
- USE_GCOV="FALSE"

- os: linux // with enabled openmp
env:
- USE_DOCKER="TRUE"
- USE_OPENMP="TRUE"
- USE_GCOV="FALSE"

- os: osx
osx_image: xcode8
osx_image: xcode10.1
env:
- MATRIX_EVAL="brew update && brew install gsl valgrind"
- MYCXX="g++"
- USE_DOCKER="FALSE"
- USE_GCOV="FALSE"
- USE_GCOV="TRUE"
- USE_OPENMP="FALSE"

- os: osx
osx_image: xcode8
osx_image: xcode10.1
env:
- MATRIX_EVAL="brew update && brew install gsl valgrind"
- MYCXX="clang++"
- USE_DOCKER="FALSE"
- USE_GCOV="TRUE"
- USE_GCOV="FALSE"
- USE_OPENMP="FALSE"

before_install:
- |
if [[ "$USE_DOCKER" == "TRUE" ]]; then
docker pull nnvmc/base;
local configopt="--enable-debug"
if [[ "$USE_OPENMP" == "TRUE" ]]; then configopt="${configopt} --enable-openmp"; fi;
if [[ "$USE_GCOV" == "TRUE" ]]; then configopt="${configopt} --enable-coverage"; fi;
docker run -it -v $(pwd):/root/repo nnvmc/base /bin/bash -c "cd /root/repo && ./autogen.sh && ./configure ${configopt}";
else
eval "${MATRIX_EVAL}" && ${MYCXX} -v;
./autogen.sh
local configopt="--enable-debug"
if [[ "$USE_GCOV" == "TRUE" ]]; then pip install cpp-coveralls; configopt="${configopt} --enable-coverage"; fi;
./configure CXX=${MYCXX} ${configopt};
${MYCXX} -v;
fi;
echo "CXX_COMPILER=${MYCXX}" >> config.sh;
echo "CXX_FLAGS=\"-O0 -g -Wall -Wno-unused-function ${configopt}\"" >> config.sh;
if [[ "$USE_GCOV" == "TRUE" ]]; then
echo "USE_COVERAGE=1" >> config.sh;
else
echo "USE_COVERAGE=0" >> config.sh;
fi;
if [[ "$USE_OPENMP" == "TRUE" ]]; then
echo "USE_OPENMP=1" >> config.sh;
else
echo "USE_OPENMP=0" >> config.sh;
fi;
echo "GSL_ROOT=" >> config.sh;
script:
- |
if [[ "$USE_DOCKER" == "TRUE" ]]; then
docker run -it -v $(pwd):/root/repo nnvmc/base /bin/bash -c "cd /root/repo && make check" || exit 1;
if [[ "$USE_GCOV" == "TRUE" ]]; then
docker run -e TRAVIS=$TRAVIS -e TRAVIS_JOB_ID=$TRAVIS_JOB_ID -it -v $(pwd):/root/repo nnvmc/base /bin/bash -c "pip install cpp-coveralls && cd /root/repo && coveralls -b lib -e test -e benchmark -e include -e lib -e examples -e script -i src --gcov-options '\-lp'";
docker run -it -v $(pwd):/root/repo nnvmc/base /bin/bash -c "cd /root/repo && ./build.sh" || exit 1;
else
./build.sh || exit 1;
fi;
- |
if [[ "$USE_DOCKER" == "TRUE" ]]; then
if [[ "$USE_OPENMP" == "TRUE" ]]; then
docker run -it -v $(pwd):/root/repo nnvmc/base /bin/bash -c "cd /root/repo/build && make test";
elif [[ "$USE_GCOV" == "TRUE" ]]; then
docker run -it -v $(pwd):/root/repo nnvmc/base /bin/bash -c "cd /root/repo/build && make test";
docker run -e TRAVIS=$TRAVIS -e TRAVIS_JOB_ID=$TRAVIS_JOB_ID -it -v $(pwd):/root/repo nnvmc/base /bin/bash -c "pip install cpp-coveralls && cd /root/repo/build && coveralls --verbose -b ./ -r ../ -i include -i src -x .cpp -x .hpp --gcov-options '\-lp'";
else
make check || exit 1;
if [[ "$USE_GCOV" == "TRUE" ]]; then coveralls -b lib -e test -e benchmark -e include -e lib -e examples -e script -i src --gcov-options '\-lp' ; fi;
docker run -it -v $(pwd):/root/repo nnvmc/base /bin/bash -c "cd /root/repo/test && ./run.sh";
fi;
else
if [[ "$USE_OPENMP" == "TRUE" ]]; then
cd build && make test && cd ..;
elif [[ "$USE_GCOV" == "TRUE" ]]; then
cd build && make test;
sudo pip install cpp-coveralls && coveralls --verbose -b ./ -r ../ -i include -i src -x .cpp -x .hpp --gcov-options '\-lp' && cd .. ;
else
cd test && ./run.sh && cd .. ;
fi;
fi;
- cat test/test-suite.log test/exe.log test/ut*/exe.log
notifications:
email:
Expand Down
41 changes: 41 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
cmake_minimum_required (VERSION 3.5)
include(FindPackageHandleStandardArgs)

project (ffnn LANGUAGES CXX VERSION 0.0.1)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${USER_CXX_FLAGS}")

if (USE_COVERAGE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
endif()

# find packages
message(STATUS "Configured GSL_ROOT_DIR: ${GSL_ROOT_DIR}")

if (USE_OPENMP)
find_package(OpenMP)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS} -DOPENMP")
message(STATUS "OPENMP_LIBRARY_PATHS: ${OpenMP_CXX_LIBRARY}")
message(STATUS "OPENMP_LIBRARIES: ${OpenMP_CXX_LIBRARIES}")
endif()

find_package(GSL)
message(STATUS "GSL_INCLUDE_DIRS: ${GSL_INCLUDE_DIRS}")
message(STATUS "GSL_LIBRARIES: ${GSL_LIBRARIES}")

message(STATUS "Configured CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER}")
message(STATUS "Configured CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")

# set header / library paths
include_directories(include/ "${GSL_INCLUDE_DIRS}") # headers

enable_testing()

# continue with subdirectories
add_subdirectory(src)
add_subdirectory(test)
add_subdirectory(benchmark)
add_subdirectory(examples)
34 changes: 0 additions & 34 deletions Makefile.am

This file was deleted.

Loading

0 comments on commit 2c03fa4

Please sign in to comment.