-
Notifications
You must be signed in to change notification settings - Fork 9
/
CMakeLists.txt
64 lines (51 loc) · 1.92 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
cmake_minimum_required (VERSION 3.2)
project (HTStream)
option(BUILD_STATIC_BIN "builds static binary (linux only)" OFF)
option(BUILD_GPERFTOOLS "links to google perftools" OFF)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
message( status "cmake module path: " ${CMAKE_MODULE_PATH})
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(Boost_USE_STATIC_LIBS OFF)
set(BUILD_SHARED_LIBS ON)
# ignore boost deprication
add_definitions("-DBOOST_BIND_GLOBAL_PLACEHOLDERS")
if (APPLE)
elseif (UNIX)
if (BUILD_STATIC_BIN)
set(EXTRA_BUILD_FLAGS ${EXTRA_BUILD_FLAGS} "-static -pthread -Wl,--whole-archive -lpthread -Wl,--no-whole-archive")
set(Boost_USE_STATIC_LIBS ON)
set(BUILD_SHARED_LIBS OFF)
endif()
endif()
if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror")
endif()
if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -Wextra")
## todo libc++
# -stdlib=libc++")
# set(PROJECT_LINK_LIBS "-lc++ -lc++abi -lm -lc -lgcc_s -lgcc")
endif()
message( status "cmake cxx flags: " ${CMAKE_CXX_FLAGS})
include(cmake/gtest.cmake)
message( status "include dirs: " ${GTEST_INCLUDE_DIRS})
enable_testing()
set(COMMON_INCLUDES ${CMAKE_SOURCE_DIR}/common/src ${CMAKE_BINARY_DIR}/common)
add_subdirectory(common)
add_subdirectory(hts_AdapterTrimmer)
add_subdirectory(hts_CutTrim)
add_subdirectory(hts_ExtractUMI)
add_subdirectory(hts_LengthFilter)
add_subdirectory(hts_NTrimmer)
add_subdirectory(hts_Overlapper)
add_subdirectory(hts_PolyATTrim)
add_subdirectory(hts_Primers)
add_subdirectory(hts_QWindowTrim)
add_subdirectory(hts_SeqScreener)
add_subdirectory(hts_Stats)
add_subdirectory(hts_SuperDeduper)
add_custom_target( copy-compile-commands ALL
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/compile_commands.json ${CMAKE_CURRENT_LIST_DIR}
COMMENT "copy compile_commands"
)