This repository has been archived by the owner on Dec 16, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* use add_compile_options instead of hardcode setting of the env variable * remove lib from include directories * add header files to the source list * include htslib directories at the cmake build location (no longer using the git-submodule) * remove git submodule and use htslib via cmake from now on. * exclude tests from building by default * build release by default, but tests in debug mode * remove boost build files * add cmake to travis * add release / debug options to the build
- Loading branch information
Mauricio Carneiro
committed
Nov 2, 2014
1 parent
40aea31
commit 6800236
Showing
13 changed files
with
122 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +0,0 @@ | ||
[submodule "lib/htslib"] | ||
path = lib/htslib | ||
url = ../htslib.git | ||
branch = broad | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,32 @@ | ||
cmake_minimum_required(VERSION 2.8.4) | ||
cmake_minimum_required(VERSION 2.8.7) | ||
project(gamgee) | ||
|
||
include(ExternalProject) | ||
|
||
## This is the right way to do this, but only supported in cmake 2.8.12 | ||
#add_compile_options("-std=c++1y") | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y") | ||
|
||
find_package(Boost 1.56 COMPONENTS unit_test_framework REQUIRED) | ||
# Dependency: Boost Unit Test Framework (find in the system) | ||
find_package(Boost 1.55 COMPONENTS unit_test_framework REQUIRED) | ||
include_directories(${Boost_INCLUDE_DIRS}) | ||
|
||
# Dependency: htslib (download and build) | ||
include("contrib/htslib.cmake") | ||
|
||
include_directories(gamgee) | ||
include_directories(gamgee/utils) | ||
include_directories(lib) | ||
include_directories(lib/htslib) | ||
|
||
add_subdirectory(gamgee) | ||
add_subdirectory(test) | ||
|
||
ADD_CUSTOM_TARGET(debug | ||
COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Debug ${CMAKE_SOURCE_DIR} | ||
COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target all | ||
COMMENT "Switch CMAKE_BUILD_TYPE to Debug" | ||
) | ||
|
||
ADD_CUSTOM_TARGET(release | ||
COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Release ${CMAKE_SOURCE_DIR} | ||
COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target all | ||
COMMENT "Switch CMAKE_BUILD_TYPE to Release" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
# build htslib | ||
set(htslib_PREFIX ${CMAKE_BINARY_DIR}/contrib/htslib-prefix) | ||
set(htslib_PREFIX ${CMAKE_BINARY_DIR}/contrib/htslib) | ||
ExternalProject_Add(htslib | ||
PREFIX ${htslib_PREFIX} | ||
GIT_REPOSITORY "https://github.com/broadinstitute/htslib.git" | ||
# NOTE: gamgee tracks the 'broad' branch | ||
# we should always sync to a commit from that branch for consistency | ||
GIT_TAG broad | ||
BUILD_IN_SOURCE 1 | ||
CONFIGURE_COMMAND "" | ||
BUILD_COMMAND ${MAKE} | ||
BUILD_COMMAND make lib-static -j 4 | ||
INSTALL_COMMAND "" | ||
) | ||
LOG_DOWNLOAD 0 | ||
LOG_UPDATE 0 | ||
LOG_CONFIGURE 0 | ||
LOG_BUILD 0 | ||
LOG_TEST 0 | ||
LOG_INSTALL 0 | ||
) | ||
|
||
include_directories(${htslib_PREFIX}/src/htslib) | ||
set(htslib_LIB ${htslib_PREFIX}/src/htslib/libhts.a) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,97 @@ | ||
set(SOURCE_FILES | ||
utils/file_utils.cpp | ||
utils/genotype_utils.cpp | ||
utils/hts_memory.cpp | ||
utils/utils.cpp | ||
utils/variant_field_type.cpp | ||
utils/variant_utils.cpp | ||
base_quals.cpp | ||
base_quals.h | ||
cigar.cpp | ||
cigar.h | ||
exceptions.h | ||
fastq.cpp | ||
fastq.h | ||
fastq_iterator.cpp | ||
fastq_iterator.h | ||
fastq_reader.cpp | ||
fastq_reader.h | ||
gamgee.h | ||
genotype.cpp | ||
genotype.h | ||
indexed_sam_iterator.cpp | ||
indexed_sam_iterator.h | ||
indexed_sam_reader.h | ||
indexed_variant_iterator.cpp | ||
indexed_variant_iterator.h | ||
indexed_variant_reader.h | ||
individual_field.h | ||
individual_field_iterator.h | ||
individual_field_value.h | ||
individual_field_value_iterator.h | ||
interval.cpp | ||
interval.h | ||
missing.h | ||
multiple_variant_iterator.cpp | ||
multiple_variant_iterator.h | ||
multiple_variant_reader.h | ||
read_bases.cpp | ||
read_bases.h | ||
read_group.cpp | ||
read_group.h | ||
reference_iterator.cpp | ||
reference_iterator.h | ||
reference_map.cpp | ||
sam.cpp | ||
reference_map.h | ||
sam_builder.cpp | ||
sam_builder_data_field.cpp | ||
sam_builder_data_field.h | ||
sam_builder.h | ||
sam.cpp | ||
sam.h | ||
sam_header.cpp | ||
sam_header.h | ||
sam_iterator.cpp | ||
sam_iterator.h | ||
sam_pair_iterator.cpp | ||
sam_pair_iterator.h | ||
sam_reader.h | ||
sam_tag.h | ||
sam_writer.cpp | ||
sam_writer.h | ||
shared_field.h | ||
shared_field_iterator.h | ||
synced_variant_iterator.cpp | ||
variant.cpp | ||
synced_variant_iterator.h | ||
synced_variant_reader.h | ||
utils/file_utils.cpp | ||
utils/file_utils.h | ||
utils/genotype_utils.cpp | ||
utils/genotype_utils.h | ||
utils/hts_memory.cpp | ||
utils/hts_memory.h | ||
utils/short_value_optimized_storage.h | ||
utils/utils.cpp | ||
utils/utils.h | ||
utils/variant_field_type.cpp | ||
utils/variant_field_type.h | ||
utils/variant_utils.cpp | ||
utils/variant_utils.h | ||
variant_builder.cpp | ||
variant_builder.h | ||
variant_builder_individual_field.h | ||
variant_builder_individual_region.cpp | ||
variant_builder_individual_region.h | ||
variant_builder_shared_region.cpp | ||
variant_header.cpp | ||
variant_builder_shared_region.h | ||
variant.cpp | ||
variant_filters.h | ||
variant_filters_iterator.h | ||
variant.h | ||
variant_header_builder.cpp | ||
variant_header_builder.h | ||
variant_header.cpp | ||
variant_header.h | ||
variant_iterator.cpp | ||
variant_iterator.h | ||
variant_reader.h | ||
variant_writer.cpp | ||
variant_writer.h | ||
zip.h | ||
) | ||
|
||
add_library(gamgee STATIC ${SOURCE_FILES}) |
This file was deleted.
Oops, something went wrong.
Submodule htslib
deleted from
a68627
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.