-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
71 lines (53 loc) · 1.9 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
cmake_policy(SET CMP0042 NEW)
cmake_minimum_required(VERSION 3.0)
project (fastx_io)
set(Boost_USE_MULTITHREADED ON)
if(NO_CHECKING)
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNO_ERROR_CHECKING=1" )
endif()
if (SANITIZE)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -fno-omit-frame-pointer -fsanitize=address -fsanitize=undefined")
endif()
if(DEBUG_SYM)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
endif()
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
file(GLOB SOURCES src/*.cpp)
file(GLOB GZSTREAM gzstream/*.cpp)
file(GLOB BZ2STREAM bz2stream/*.cpp)
file(GLOB HEADERS src/*.h)
file(GLOB EXTHEADERS generic_matrix/*.h)
set(BSHEADERS external/libbs/src/str_manip.h)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/src
${CMAKE_CURRENT_SOURCE_DIR}/bz2stream
${CMAKE_CURRENT_SOURCE_DIR}/gzstream
${CMAKE_CURRENT_SOURCE_DIR}/generic_matrix
${CMAKE_CURRENT_SOURCE_DIR}/external/smhasher/src
${CMAKE_CURRENT_SOURCE_DIR}/external/libbs/src
)
add_subdirectory(external/libbs)
add_library(fastxio SHARED ${SOURCES} ${GZSTREAM} ${BZ2STREAM}
${CMAKE_CURRENT_SOURCE_DIR}/external/smhasher/src/MurmurHash3.cpp)
add_library(fastxioS STATIC ${SOURCES} ${GZSTREAM} ${BZ2STREAM}
${CMAKE_CURRENT_SOURCE_DIR}/external/smhasher/src/MurmurHash3.cpp)
set_target_properties(fastxioS PROPERTIES OUTPUT_NAME fastxio)
set_property(TARGET fastxio PROPERTY CXX_STANDARD 11)
set_property(TARGET fastxioS PROPERTY CXX_STANDARD 11)
target_link_libraries(fastxio z bz2 bs)
target_link_libraries(fastxioS z bz2 bs)
###
## Apps
###
if (BUILD_APPS)
add_subdirectory(apps/extr_prom)
add_subdirectory(apps/contaminant_filter)
add_subdirectory(apps/kmer_map)
add_subdirectory(apps/ta_sites)
endif()
if (PERFTOOLS)
target_link_libraries(fastxio profiler)
endif()
install(TARGETS fastxio fastxioS
DESTINATION lib)
install(FILES ${HEADERS} ${EXTHEADERS} ${BSHEADERS} DESTINATION include/fastxio)