Commit e2c1eec5 authored by Andreas Tille's avatar Andreas Tille
Browse files

New upstream version 5.3.3+dfsg

parent 004f0d13
Loading
Loading
Loading
Loading

.gitmodules

deleted100644 → 0
+0 −8
Original line number Diff line number Diff line
[submodule "pbbam"]
	path = pbbam
	url = ../pbbam.git
	branch = master
[submodule "googletest"]
	path = googletest
	url = https://github.com/google/googletest.git
	branch = master

.travis.yml

deleted100644 → 0
+0 −20
Original line number Diff line number Diff line
language: cpp
script: 
  - ./travis.sh
compiler:
  - gcc
# - clang
install:
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi
addons:
  apt:
    sources:
    - ubuntu-toolchain-r-test
    packages:
    - gcc-4.8
    - g++-4.8
#   - clang
#   - libhdf5-serial-1.8.4
notifications:
  email: false
sudo: false

CMakeLists.txt

deleted100644 → 0
+0 −85
Original line number Diff line number Diff line
##############################################
# CMake build script for the BLASRLIBCPP library
##############################################

cmake_policy(SET CMP0048 NEW)
project(BLASRLIBCPP VERSION 5.3.0 LANGUAGES CXX C)
cmake_minimum_required(VERSION 3.6)

set(ROOT_PROJECT_NAME ${PROJECT_NAME} CACHE STRING "root project name")

# Build type
IF(NOT CMAKE_BUILD_TYPE)
    SET(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, options are: Debug Release Profile RelWithDebInfo ReleaseWithAssert" FORCE)
ENDIF(NOT CMAKE_BUILD_TYPE)

# Main project paths
set(BLASRLIBCPP_RootDir ${BLASRLIBCPP_SOURCE_DIR})

# Project configuration
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake ${CMAKE_MODULE_PATH})

# Fixed order, do not sort or shuffle
include(blasrlibcpp-ccache)
include(blasrlibcpp-releasewithassert)
include(blasrlibcpp-dependencies)
include(blasrlibcpp-compilerflags)
include(blasrlibcpp-gitsha1)

file(WRITE pbdata/LibBlasrConfig.h "")

GET_PROPERTY(BLASRLIBCPP_COMPIPLE_FLAGS GLOBAL PROPERTY BLASRLIBCPP_COMPIPLE_FLAGS_GLOBAL)
GET_PROPERTY(BLASRLIBCPP_LINK_FLAGS GLOBAL PROPERTY BLASRLIBCPP_LINK_FLAGS_GLOBAL)
GET_PROPERTY(HDF5_LINKER_FLAG_LOCAL GLOBAL PROPERTY HDF5_LINKER_FLAG_GLOBAL)

set(LOCAL_LINKER_FLAGS "${HDF5_LINKER_FLAG_LOCAL} ${BLASRLIBCPP_LINK_FLAGS}")

# libcpp library
file(GLOB HDF5_CPP "${BLASRLIBCPP_RootDir}/hdf/*.cpp")
file(GLOB_RECURSE ALIGNMENT_CPP "${BLASRLIBCPP_RootDir}/alignment/*.cpp")
file(GLOB_RECURSE PBDATA_CPP "${BLASRLIBCPP_RootDir}/pbdata/*.cpp")

add_library(libcpp
    ${HDF5_CPP}
    ${ALIGNMENT_CPP}
    ${PBDATA_CPP}
)

target_include_directories(libcpp PUBLIC
    ${BLASRLIBCPP_RootDir}/hdf
    ${BLASRLIBCPP_RootDir}/alignment
    ${BLASRLIBCPP_RootDir}/pbdata
    ${HDF5_INCLUDE_DIRS}
    ${PacBioBAM_INCLUDE_DIRS}
)

target_link_libraries(libcpp ${PacBioBAM_LIBRARIES})

set_target_properties(libcpp PROPERTIES COMPILE_FLAGS ${BLASRLIBCPP_COMPIPLE_FLAGS})
if (LOCAL_LINKER_FLAGS)
    set_target_properties(libcpp PROPERTIES LINK_FLAGS ${LOCAL_LINKER_FLAGS})
endif()

# Tests
enable_testing()

## build gtest
add_subdirectory(${BLASRLIBCPP_RootDir}/googletest/googletest external/gtest)

## build libcpp tests
file(GLOB_RECURSE TEST_CPP "${BLASRLIBCPP_RootDir}/unittest/*/*.cpp")

add_executable(libcpptest ${TEST_CPP})
target_include_directories(libcpptest PUBLIC ${BLASRLIBCPP_RootDir}/unittest)
target_link_libraries(libcpptest gtest_main libcpp hdf5 hdf5_cpp ${ZLIB_LDFLAGS})
add_test(libcpptest libcpptest)

set_target_properties(libcpptest PROPERTIES COMPILE_FLAGS "${BLASRLIBCPP_COMPIPLE_FLAGS}")

if (LOCAL_LINKER_FLAGS)
    set_target_properties(libcpptest PROPERTIES LINK_FLAGS ${LOCAL_LINKER_FLAGS})
endif()

add_custom_target(check_libcpp
    COMMAND libcpptest --gtest_output=xml:${CMAKE_BINARY_DIR}/libcpp-unit.xml
    WORKING_DIRECTORY ${BLASRLIBCPP_RootDir})

DEVELOPER.md

deleted100644 → 0
+0 −45
Original line number Diff line number Diff line
# Developer environment

## Clang-format pre commit hook

### What?
The intention here is to get source code formatting automatically
checked and guaranteed before checkin.

### Why?
- Automate style-guide compliance to avoid squabbles
- Post-checkin reformatting binges mess up history.  It's best to get
  it right from the get-go.


### How?
See the tools:
  - `tools/check-formatting --staged` for fast style-checking of
    changed files, in a git commit/push hook;
  - `tools/check-formatting --all` for slower style-checking of everything
  - `tools/format-all`to format everything

To enable the checking as a pre-commit hook, place the following in
`.git/hooks/pre-commit` (and make that file executable):

```sh
#!/bin/bash
./tools/check-formatting --staged
```

### Tips
- We should *not* reformat bundled third-party code as it will make it
  difficult to diff with upstream.  Put such code in a subdirectory
  with its own .clang-format file containing: "BasedOnStyle: None" to
  disable formatting.

- If clang-format mangles something (for example, a comment block with
  ASCII art or significant whitespace), you can protect a block using
  `// clang-format off` and then `// clang-format on`.

* What are these binaries?
  The `clang-format` binaries that are checked in are static builds of
  clang-format v3.9 from https://github.com/angular/clang-format.
  They are bundled because the LLVM toolchain has a reputation for
  rapid change and incompatibility.  We want to guarantee that devs
  are using the same version as CI is.
+34 −37
Original line number Diff line number Diff line
```
// Copyright (c) 2014-2015, Pacific Biosciences of California, Inc.
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted (subject to the limitations in the
// disclaimer below) provided that the following conditions are met:
//
//  * Redistributions of source code must retain the above copyright
//    notice, this list of conditions and the following disclaimer.
//
//  * Redistributions in binary form must reproduce the above
//    copyright notice, this list of conditions and the following
//    disclaimer in the documentation and/or other materials provided
//    with the distribution.
//
//  * Neither the name of Pacific Biosciences nor the names of its
//    contributors may be used to endorse or promote products derived
//    from this software without specific prior written permission.
//
// NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
// GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY PACIFIC
// BIOSCIENCES AND ITS CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL PACIFIC BIOSCIENCES OR ITS
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
// SUCH DAMAGE.
Copyright (c) 2014-2018, Pacific Biosciences of California, Inc.

All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted (subject to the limitations in the
disclaimer below) provided that the following conditions are met:

 * Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.

 * Redistributions in binary form must reproduce the above
   copyright notice, this list of conditions and the following
   disclaimer in the documentation and/or other materials provided
   with the distribution.

 * Neither the name of Pacific Biosciences nor the names of its
   contributors may be used to endorse or promote products derived
   from this software without specific prior written permission.

NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY PACIFIC
BIOSCIENCES AND ITS CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL PACIFIC BIOSCIENCES OR ITS
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.

See pbdata/MD5Utils.* for the following:
 /*
@@ -96,5 +95,3 @@ See alignment/algorithms/sorting/qsufsort.cpp for the following:
   distributed, the copyright notice must be retained and any alterations in
   the code must be clearly marked. No warranty is given regarding the quality
   of this software.*/

```
Loading