Skip to content
Commits on Source (14)
# This file is used to ignore files which are generated
# ----------------------------------------------------------------------------
*~
*.autosave
*.a
*.core
*.moc
*.o
*.obj
*.orig
*.rej
*.so
*.so.*
*_pch.h.cpp
*_resource.rc
*.qm
.#*
*.*#
core
!core/
tags
.DS_Store
.directory
*.debug
Makefile*
*.prl
*.app
moc_*.cpp
ui_*.h
qrc_*.cpp
Thumbs.db
*.res
*.rc
/.qmake.cache
/.qmake.stash
# qtcreator generated files
*.pro.user*
CMakeLists.txt.user
# xemacs temporary files
*.flc
# Vim temporary files
.*.swp
# Visual Studio generated files
*.ib_pdb_index
*.idb
*.ilk
*.pdb
*.sln
*.suo
*.vcproj
*vcproj.*.*.user
*.ncb
*.sdf
*.opensdf
*.vcxproj
*vcxproj.*
# MinGW generated files
*.Debug
*.Release
# Python byte code
*.pyc
# Binaries
# --------
*.dll
*.exe
# Generated directories
bin
build
lib
/build*
# Meson WrapDB stuff
subprojects/packagecache/
subprojects/googletest*
/subprojects/*
!/subprojects/*.wrap
......@@ -2,8 +2,43 @@
## Active
### TODO
- Initial sequence-related data structures
## [1.3.0] - 2019-07-11
### Added
- Alignment algorithms from unanimity (local alignment, semi-global, affine, etc)
### Removed
- Unused CallbackTimer
- Unused PacBio::Stream utilities
## [1.2.0] - 2019-05-03
### Changed
- CLI_v2::Results::NumProcessors() changed to CLI_v2::Results::NumThreads() for clarity.
### Added
- Convenience methods for CLI_v2 clients: default log level override, explicit access to built-ins, built-in 'num-threads' option.
## [1.1.0] - 2019-04-29
### Added
- Reports module
## [1.0.0] - 2019-04-23
### Changed
- C++14 is now a *hard* minimum.
### Removed
- Headers emulating C++14 features for C++11.
### Added
- New (opt-in) CLI version 2.
## [0.5.0] - 2019-04-11
### Changed
- Requires C++14 at minimum.
## [0.3.0] - 2018-04-30
......
########################################################################
# CMake build script for PacBio pbcopper library.
########################################################################
cmake_policy(SET CMP0048 NEW) # lets us set version in project()
cmake_minimum_required(VERSION 3.2)
project(pbcopper VERSION 0.4.0 LANGUAGES CXX C)
enable_testing()
# project options
option(pbcopper_build_shared "Build pbcopper as a shared library." OFF)
option(pbcopper_use_ccache "Build pbcopper using ccache, if available." ON)
option(pbcopper_build_tests "Build pbcopper tests." ON)
option(pbcopper_build_docs "Build pbcopper docs." ON)
option(pbcopper_build_examples "Build pbcopper examples." ON)
# project paths
set(pbcopper_RootDir ${CMAKE_CURRENT_LIST_DIR})
set(pbcopper_DocsDir ${pbcopper_RootDir}/docs)
set(pbcopper_IncludeDir ${pbcopper_RootDir}/include)
set(pbcopper_SourceDir ${pbcopper_RootDir}/src)
set(pbcopper_TestsDir ${pbcopper_RootDir}/tests)
set(pbcopper_ThirdPartyDir ${pbcopper_RootDir}/third-party)
if(NOT pbcopper_OutputDir)
set(pbcopper_OutputDir ${CMAKE_CURRENT_BINARY_DIR})
endif()
set(pbcopper_LibDir ${pbcopper_OutputDir}/lib)
file(MAKE_DIRECTORY ${pbcopper_LibDir})
# project configuration
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake ${CMAKE_MODULE_PATH})
include(pbcopper-compilerflags)
include(pbcopper-ccache)
include(pbcopper-dependencies)
include(pbcopper-libtype)
# config generation
include(pbcopper-gitsha1)
find_git_sha1(COPPER_GIT_SHA1)
configure_file(
${pbcopper_SourceDir}/utility/PbcopperGitHash.cpp.in
${CMAKE_BINARY_DIR}/generated/utility/PbcopperGitHash.cpp
)
configure_file(
${pbcopper_SourceDir}/utility/PbcopperVersion.cpp.in
${CMAKE_BINARY_DIR}/generated/utility/PbcopperVersion.cpp
)
# main library
add_subdirectory(src)
# project extras - only build on demand
#
if (pbcopper_build_docs)
add_subdirectory(docs) # build with 'make doc' or 'make docs'
endif()
if (pbcopper_build_examples)
add_subdirectory(examples) # build with 'make examples'
endif()
if (pbcopper_build_tests)
add_subdirectory(tests)
endif()
......@@ -9,27 +9,14 @@ Download repo & compile library:
```sh
git clone https://github.com/PacificBiosciences/pbcopper.git && cd pbcopper
mkdir build && cd build
cmake ..
make
meson build .
ninja -C build
```
To build & run tests:
```sh
make check
```
To build examples:
```sh
make examples
```
To build Doxygen API documentation: (**not yet available**)
```sh
make docs
ninja -C build test
```
## API Overview - main modules
......
......@@ -23,72 +23,27 @@ BOOST_ROOT="${BOOST_ROOT%/include}"
unset BOOST_INCLUDEDIR
unset BOOST_LIBRARYDIR
export CC="ccache gcc"
export CXX="ccache g++"
export CCACHE_BASEDIR="${PWD}"
if [[ $USER == bamboo ]]; then
export CCACHE_DIR=/mnt/secondary/Share/tmp/bamboo.${bamboo_shortPlanKey}.ccachedir
export CCACHE_TEMPDIR=/scratch/bamboo.ccache_tempdir
fi
case "${bamboo_planRepository_branchName}" in
develop|master)
export PREFIX_ARG="/mnt/software/p/pbcopper/${bamboo_planRepository_branchName}"
export BUILD_NUMBER="${bamboo_globalBuildNumber:-0}"
;;
*)
export BUILD_NUMBER="0"
;;
esac
# in order to make shared libraries consumable
# by conda and other package managers
export LDFLAGS="-static-libstdc++ -static-libgcc"
for i in "system-gcc" "gcc/8.1.0" "gcc"; do
# 1. load either current MOBS GCC or RHEL-default GCC
if [[ ${i} == system-gcc ]]; then
module load gtest/gcc48
else
module load ${i} gtest
fi
module load ccache
export CURRENT_BUILD_DIR="build_gcc=${i/\//_}"
export ENABLED_TESTS="true"
bash scripts/ci/build.sh
bash scripts/ci/test.sh
export LDFLAGS=${LDFLAGS:-"-fuse-ld=gold -static-libstdc++ -static-libgcc"}
module unload ccache gtest
[[ ${i} != system-gcc ]] && module unload gcc
done
source scripts/ci/setup.sh
source scripts/ci/build.sh
source scripts/ci/test.sh
# create symlink so Bamboo can find the xunit output
ln -s "${CURRENT_BUILD_DIR}" build
if [[ -z ${PREFIX_ARG+x} ]]; then
if [[ ${BUILD_NUMBER} == 0 ]]; then
echo "Not installing anything (branch: ${bamboo_planRepository_branchName}), exiting."
exit 0
fi
# reload GCC to prevent default `g++` from mis-linking
module load gcc
bash scripts/ci/install.sh
if [[ ${BUILD_NUMBER} == 0 ]]; then
echo "Build number is 0, hence not creating artifact"
exit 0
fi
source scripts/ci/install.sh
## Creating artifact
# install into staging dir with --prefix /usr/local
# in order to sidestep all the artifact policy
rm -rf staging
meson configure -Dprefix=/usr/local -Dtests=false "${CURRENT_BUILD_DIR}"
DESTDIR="${PWD}/staging" ninja -C "${CURRENT_BUILD_DIR}" -v install
meson configure -Dprefix=/usr/local "${CURRENT_BUILD_DIR:-build}"
DESTDIR="${PWD}/staging" ninja -C "${CURRENT_BUILD_DIR:-build}" -v install
( cd staging && tar zcf ../pbcopper-SNAPSHOT.tgz . )
md5sum pbcopper-SNAPSHOT.tgz | awk -e '{print $1}' >| pbcopper-SNAPSHOT.tgz.md5
......
#!/usr/bin/env bash
set -vex
## Load modules
type module >& /dev/null || . /mnt/software/Modules/current/init/bash
module purge
module load gcc
module load ccache
module load meson
module load ninja
module load boost
module load doxygen
module load gcov
module load gtest
#####################
# BUILD & RUN TESTS #
#####################
rm -rf build
mkdir build
cd build
meson \
--werror \
--backend ninja \
--buildtype debug \
--default-library shared \
--libdir lib \
--wrap-mode nofallback \
--prefix "${PREFIX_ARG:-/usr/local}" \
-Db_coverage=true \
..
ninja test
############
# COVERAGE #
############
find . -type f -iname '*.o' | xargs gcov -acbrfu {} \; >/dev/null && \
mkdir coverage && pushd coverage && mv ../*.gcov . && \
sed -i -e 's@Source:@Source:../@' *.gcov && \
sed -i -e 's@Graph:@Graph:../@' *.gcov && \
sed -i -e 's@Data:@Data:../@' *.gcov
#!/usr/bin/env bash
echo "################"
echo "# DEPENDENCIES #"
echo "################"
echo "## Load modules"
source /mnt/software/Modules/current/init/bash
module load gcc meson ccache ninja gtest
if [[ $USER == "bamboo" ]]; then
export CCACHE_DIR=/mnt/secondary/Share/tmp/bamboo.mobs.ccachedir
export CCACHE_TEMPDIR=/scratch/bamboo.ccache_tempdir
fi
export CCACHE_COMPILERCHECK='%compiler% -dumpversion'
export CCACHE_BASEDIR=$PWD
echo "#########"
echo "# TESTS #"
echo "#########"
echo "## Unit tests"
ninja -C build test
#!/bin/bash
echo "# DEPENDENCIES"
echo "## Load modules"
source /mnt/software/Modules/current/init/bash
module load gcc cmake ccache ninja boost doxygen
export CC=gcc CXX=g++
echo "# BUILD"
echo "## Create build directory "
if [ ! -d build ] ; then mkdir build ; fi
echo "## Build source"
( cd build &&\
rm -rf * &&\
CMAKE_BUILD_TYPE=ReleaseWithAssert cmake -GNinja .. )
( cd build && ninja )
echo "# TEST"
echo "# Run unit tests"
( cd build && ninja check-xunit )
if(pbcopper_use_ccache)
find_program(CCACHE_FOUND ccache)
if(CCACHE_FOUND)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
endif()
endif()
include(CheckCXXCompilerFlag)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# NOTE: quash clang warnings w/ Boost
check_cxx_compiler_flag("-Wno-unused-local-typedefs" HAS_NO_UNUSED_LOCAL_TYPEDEFS)
if(HAS_NO_UNUSED_LOCAL_TYPEDEFS)
set(pbcopper_CXX_FLAGS "${pbcopper_CXX_FLAGS} -Wno-unused-local-typedefs")
endif()
if(NOT Boost_INCLUDE_DIRS)
find_package(Boost REQUIRED)
endif()
if(__find_git_sha1)
return()
endif()
set(__find_git_sha1 YES)
function(find_git_sha1 _GIT_SHA1)
find_package(Git QUIET REQUIRED)
execute_process(COMMAND
"${GIT_EXECUTABLE}" "describe" "--always" "--dirty=*"
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
RESULT_VARIABLE res
OUTPUT_VARIABLE out
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
if (NOT res EQUAL 0)
message(FATAL_ERROR "Could not determine git sha1 via `git describe --always --dirty=*`")
endif()
set(${_GIT_SHA1} "${out}" PARENT_SCOPE)
endfunction()
if(pbcopper_build_shared)
set(BUILD_SHARED_LIBS ON)
set(PBCOPPER_LIB_MODE SHARED)
set(PBCOPPER_LIB_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX})
else()
set(BUILD_SHARED_LIBS OFF)
set(PBCOPPER_LIB_MODE STATIC)
set(PBCOPPER_LIB_SUFFIX ${CMAKE_STATIC_LIBRARY_SUFFIX})
endif()
pbcopper (1.3.0+dfsg-1) unstable; urgency=medium
* Fix watch file
* New upstream version
* debhelper-compat 12
* Standards-Version: 4.4.1
* Remove patch git-version.patch that is missing from
debian/patches/series.
* Build-Depends: meson, libgtest-dev
* Meson does not build static lib - leave this out for the moment
* Split binary packages into dynamic lib and development package
-- Andreas Tille <tille@debian.org> Tue, 17 Dec 2019 11:16:46 +0100
pbcopper (0.4.1+dfsg-3) unstable; urgency=medium
[ Afif Elghraoui ]
......
......@@ -3,19 +3,36 @@ Maintainer: Debian Med Packaging Team <debian-med-packaging@lists.alioth.debian.
Uploaders: Andreas Tille <tille@debian.org>
Section: libs
Priority: optional
Build-Depends: debhelper (>= 11~),
dh-exec,
Build-Depends: debhelper-compat (= 12),
# dh-exec,
meson,
cmake,
libboost-dev
Standards-Version: 4.3.0
pkg-config,
libboost-dev,
googletest,
libgtest-dev
Standards-Version: 4.4.1
Vcs-Browser: https://salsa.debian.org/med-team/pbcopper
Vcs-Git: https://salsa.debian.org/med-team/pbcopper.git
Homepage: https://github.com/PacificBiosciences/pbcopper
Package: libpbcopper1.3.0
Architecture: any
Section: libs
Depends: ${misc:Depends},
${shlibs:Depends}
Description: data structures, algorithms, and utilities for C++ applications
pbcopper provides general tools for C++ applications. It is developed
for use by applications of the Pacific Biosciences SMRT Analysis
suite.
.
This package contains the dynamic library
Package: libpbcopper-dev
Architecture: any
Section: libdevel
Depends: ${misc:Depends},
Depends: libpbcopper1.3.0 (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends}
Description: data structures, algorithms, and utilities for C++ applications -- header files
pbcopper provides general tools for C++ applications. It is developed
......
......@@ -13,10 +13,6 @@ Files: include/pbcopper/json/internal/json.hpp
Copyright: 2013-2016 Niels Lohmann <http://nlohmann.me>
License: MIT
Files: third-party/googletest/*
Copyright: 2005-2015, Google Inc.
License: BSD-3-Clause-Google
Files: debian/*
Copyright: 2016 Afif Elghraoui <afif@debian.org>
License: BSD-3-Clause
......
#!/usr/bin/dh-exec
include/pbcopper /usr/include
*/lib/libpbcopper.a /usr/lib/${DEB_HOST_MULTIARCH}
usr/include
usr/lib/*/pkgconfig
usr/lib/*/*.so