Skip to content

Commit 2160b94

Browse files
authored
Version 2.6.1 (#7)
1 parent d68b484 commit 2160b94

File tree

104 files changed

+6539
-3661
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+6539
-3661
lines changed

.gitignore

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
/*debug*/
66
/*-build/
77
/profiling/
8+
/compilation_database/
89
example_test.vcf
910
*.log
1011
.nfs*
@@ -19,11 +20,6 @@ example_test.vcf
1920
# Ignore data files
2021
test/data/graphs
2122
/data
22-
trash
23-
24-
## Ignore htslib build files
25-
htslib/src
26-
htslib/tmp
2723

2824
# Ignore simulated data
2925
test/simulated_data/fasta

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,7 @@
1919
path = parallel-hashmap
2020
url = https://github.com/greg7mdp/parallel-hashmap.git
2121
ignore = dirty
22+
[submodule "libdeflate"]
23+
path = libdeflate
24+
url = https://github.com/ebiggers/libdeflate.git
25+
ignore = dirty

CMakeLists.txt

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ include(ExternalProject)
66
# The version number
77
set (graphtyper_VERSION_MAJOR 2)
88
set (graphtyper_VERSION_MINOR 6)
9-
set (graphtyper_VERSION_PATCH 0)
9+
set (graphtyper_VERSION_PATCH 1)
1010
set(STATIC_DIR "" CACHE STRING "If set, GraphTyper will be built as a static binary using libraries from the given STATIC_DIR.")
1111

1212
# Get the current working branch
@@ -58,6 +58,8 @@ else()
5858
set (CMAKE_CXX_FLAGS "-O3 -DNDEBUG ${CMAKE_CXX_FLAGS}")
5959
endif()
6060

61+
set (CMAKE_CXX_FLAGS_RELEASE "")
62+
set (CMAKE_CXX_FLAGS_DEBUG "")
6163
message(STATUS "CXX flags are: ${CMAKE_CXX_FLAGS}")
6264

6365
# configure a header file to pass some of the CMake settings to the source code
@@ -77,14 +79,37 @@ message (STATUS "Boost include directory: ${Boost_INCLUDE_DIR}")
7779
include_directories(SYSTEM ${Boost_INCLUDE_DIR})
7880
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I ${Boost_INCLUDE_DIR}")
7981

82+
## libdeflate
83+
ExternalProject_Add(
84+
project_libdeflate
85+
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libdeflate
86+
BUILD_IN_SOURCE 1
87+
PREFIX ${CMAKE_CURRENT_SOURCE_DIR}/libdeflate
88+
CONFIGURE_COMMAND ""
89+
BUILD_COMMAND $(MAKE) -C ${CMAKE_CURRENT_SOURCE_DIR}/libdeflate "CFLAGS=-fPIC -O3" libdeflate.a
90+
INSTALL_COMMAND ""
91+
)
92+
93+
ExternalProject_Get_Property(project_libdeflate install_dir)
94+
add_library(libdeflate STATIC IMPORTED)
95+
96+
#include_directories(SYSTEM ${install_dir})
97+
98+
set(libdeflate_location ${install_dir}/libdeflate.a)
99+
message(STATUS "libdeflate target location is ${libdeflate_location}")
100+
set_property(TARGET libdeflate PROPERTY IMPORTED_LOCATION ${libdeflate_location})
101+
add_dependencies(libdeflate project_libdeflate)
102+
80103
## htslib
81104
ExternalProject_Add(
82105
project_htslib
83106
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/htslib
84107
BUILD_IN_SOURCE 1
85108
PREFIX ${CMAKE_CURRENT_SOURCE_DIR}/htslib
86-
CONFIGURE_COMMAND autoheader COMMAND autoconf COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/htslib/configure --disable-libcurl
87-
BUILD_COMMAND $(MAKE) -C ${CMAKE_CURRENT_SOURCE_DIR}/htslib "CFLAGS=-g -Wall -O3" libhts.a
109+
CONFIGURE_COMMAND autoheader COMMAND autoconf COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/htslib/configure --disable-libcurl --disable-gcs --with-libdeflate
110+
"CFLAGS=-I${CMAKE_CURRENT_SOURCE_DIR}/libdeflate"
111+
"LDFLAGS=-L${CMAKE_CURRENT_SOURCE_DIR}/libdeflate"
112+
BUILD_COMMAND $(MAKE) -C ${CMAKE_CURRENT_SOURCE_DIR}/htslib "CFLAGS=-g -Wall -O3 -I${CMAKE_CURRENT_SOURCE_DIR}/libdeflate" libhts.a
88113
INSTALL_COMMAND ""
89114
)
90115

@@ -99,6 +124,7 @@ set(htslib_location ${install_dir}/libhts.a)
99124
message(STATUS "htslib target location is ${htslib_location}")
100125
set_property(TARGET htslib PROPERTY IMPORTED_LOCATION ${htslib_location})
101126
add_dependencies(htslib project_htslib)
127+
add_dependencies(project_htslib libdeflate)
102128

103129
## paw
104130
ExternalProject_Add(
@@ -153,6 +179,7 @@ if(STATIC_DIR STREQUAL "")
153179
set(graphtyper_all_libraries
154180
htslib
155181
paw
182+
libdeflate
156183
${Boost_LIBRARIES}
157184
${CMAKE_THREAD_LIBS_INIT}
158185
${ZLIB_LIBRARIES}
@@ -179,6 +206,7 @@ else(STATIC_DIR STREQUAL "")
179206
set(graphtyper_all_libraries
180207
htslib
181208
paw
209+
libdeflate
182210
${STATIC_DIR}/libboost_system.a
183211
${STATIC_DIR}/libboost_iostreams.a
184212
${STATIC_DIR}/libboost_log_setup.a
@@ -194,6 +222,7 @@ else(STATIC_DIR STREQUAL "")
194222
${STATIC_DIR}/libz.a
195223
${STATIC_DIR}/libbz2.a
196224
${STATIC_DIR}/liblzma.a
225+
${STATIC_DIR}/librt.a
197226
)
198227
endif(STATIC_DIR STREQUAL "")
199228

0 commit comments

Comments
 (0)