Skip to content

Commit

Permalink
Merge branch 'release/0.6.3-beta'
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Cooke committed Mar 21, 2019
2 parents 6c48092 + 8b0e296 commit fd98129
Show file tree
Hide file tree
Showing 68 changed files with 2,047 additions and 529 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ project(octopus)

set(octopus_VERSION_MAJOR 0)
set(octopus_VERSION_MINOR 6)
set(octopus_VERSION_PATCH 2)
set(octopus_VERSION_PATCH 3)
set(octopus_VERSION_RELEASE beta)

# Get the current working branch
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ $ octopus -R hs37d5.fa -I NA12878.bam -T 1 to MT -o NA12878.octopus.vcf.gz --for
* Git 2.5 or greater
* Boost 1.65 or greater
* htslib 1.4 or greater
* GMP 5.1.0 or greater
* CMake 3.9 or greater
* Optional:
* Python3 or greater
Expand All @@ -56,6 +57,7 @@ $ brew update
$ brew install git
$ brew install --with-clang llvm
$ brew install boost
$ brew install gmp
$ brew install cmake
$ brew tap homebrew/science # required for htslib
$ brew install htslib
Expand All @@ -72,6 +74,7 @@ Depending on your Ubuntu distribution, some requirements can be installed with `
$ sudo add-apt-repository ppa:ubuntu-toolchain-r/test
$ sudo apt-get update && sudo apt-get upgrade
$ sudo apt-get install gcc-7
$ sudo apt-get install libgmp3-dev
$ sudo apt-get install git-all
$ sudo apt-get install python3
```
Expand Down
76 changes: 76 additions & 0 deletions build/cmake/modules/FindGMP.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Try to find the GMP library
# https://gmplib.org/
#
# This module supports requiring a minimum version, e.g. you can do
# find_package(GMP 6.0.0)
# to require version 6.0.0 to newer of GMP.
#
# Once done this will define
#
# GMP_FOUND - system has GMP lib with correct version
# GMP_INCLUDES - the GMP include directory
# GMP_LIBRARIES - the GMP library
# GMP_VERSION - GMP version
#
# Copyright (c) 2016 Jack Poulson, <jack.poulson@gmail.com>
# Redistribution and use is allowed according to the terms of the BSD license.

find_path(GMP_INCLUDES NAMES gmp.h PATHS ${GMPlib_ROOT} $ENV{GMPDIR} ${INCLUDE_INSTALL_DIR} PATH_SUFFIXES include)

# Set GMP_FIND_VERSION to 5.1.0 if no minimum version is specified
if(NOT GMP_FIND_VERSION)
if(NOT GMP_FIND_VERSION_MAJOR)
set(GMP_FIND_VERSION_MAJOR 5)
endif()
if(NOT GMP_FIND_VERSION_MINOR)
set(GMP_FIND_VERSION_MINOR 1)
endif()
if(NOT GMP_FIND_VERSION_PATCH)
set(GMP_FIND_VERSION_PATCH 0)
endif()
set(GMP_FIND_VERSION
"${GMP_FIND_VERSION_MAJOR}.${GMP_FIND_VERSION_MINOR}.${GMP_FIND_VERSION_PATCH}")
endif()

message(STATUS "GMP_INCLUDES=${GMP_INCLUDES}")
if(GMP_INCLUDES)
# Since the GMP version macros may be in a file included by gmp.h of the form
# gmp-.*[_]?.*.h (e.g., gmp-x86_64.h), we search each of them.
file(GLOB GMP_HEADERS "${GMP_INCLUDES}/gmp.h" "${GMP_INCLUDES}/gmp-*.h")
foreach(gmp_header_filename ${GMP_HEADERS})
file(READ "${gmp_header_filename}" _gmp_version_header)
string(REGEX MATCH
"define[ \t]+__GNU_MP_VERSION[ \t]+([0-9]+)" _gmp_major_version_match
"${_gmp_version_header}")
if(_gmp_major_version_match)
set(GMP_MAJOR_VERSION "${CMAKE_MATCH_1}")
string(REGEX MATCH "define[ \t]+__GNU_MP_VERSION_MINOR[ \t]+([0-9]+)"
_gmp_minor_version_match "${_gmp_version_header}")
set(GMP_MINOR_VERSION "${CMAKE_MATCH_1}")
string(REGEX MATCH "define[ \t]+__GNU_MP_VERSION_PATCHLEVEL[ \t]+([0-9]+)"
_gmp_patchlevel_version_match "${_gmp_version_header}")
set(GMP_PATCHLEVEL_VERSION "${CMAKE_MATCH_1}")
set(GMP_VERSION
${GMP_MAJOR_VERSION}.${GMP_MINOR_VERSION}.${GMP_PATCHLEVEL_VERSION})
endif()
endforeach()

# Check whether found version exists and exceeds the minimum requirement
if(NOT GMP_VERSION)
set(GMP_VERSION_OK FALSE)
message(STATUS "GMP version was not detected")
elseif(${GMP_VERSION} VERSION_LESS ${GMP_FIND_VERSION})
set(GMP_VERSION_OK FALSE)
message(STATUS "GMP version ${GMP_VERSION} found in ${GMP_INCLUDES}, "
"but at least version ${GMP_FIND_VERSION} is required")
else()
set(GMP_VERSION_OK TRUE)
endif()
endif()

find_library(GMP_LIBRARIES gmp PATHS ${GMPlib_ROOT} $ENV{GMPDIR} ${LIB_INSTALL_DIR} PATH_SUFFIXES lib)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GMP DEFAULT_MSG
GMP_INCLUDES GMP_LIBRARIES GMP_VERSION_OK)
mark_as_advanced(GMP_INCLUDES GMP_LIBRARIES)
Binary file modified doc/manuals/user/octopus-user-manual.pdf
Binary file not shown.
Loading

0 comments on commit fd98129

Please sign in to comment.