-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeListsKMC.txt.in
87 lines (71 loc) · 1.89 KB
/
CMakeListsKMC.txt.in
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
cmake_minimum_required(VERSION 2.8.2)
project(KMC)
if(APPLE)
string(APPEND CMAKE_CXX_FLAGS " \
-Wall -O3 -m64 \
-pthread -std=c++11 \
")
elseif(UNIX)
string(APPEND CMAKE_CXX_FLAGS " \
-Wall -O3 -m64 -Wl,--whole-archive \
-pthread -Wl,--no-whole-archive -std=c++11 \
")
endif()
if(@BUILD_STATIC@)
string(APPEND CMAKE_CXX_FLAGS " -static ")
endif()
set(KMC_MAIN_DIR @KMC_MAIN_DIR@)
file(GLOB KMC_files
#${KMC_MAIN_DIR}/kmer_counter.cpp
${KMC_MAIN_DIR}/mmer.cpp
${KMC_MAIN_DIR}/mem_disk_file.cpp
${KMC_MAIN_DIR}/rev_byte.cpp
${KMC_MAIN_DIR}/bkb_writer.cpp
${KMC_MAIN_DIR}/cpu_info.cpp
${KMC_MAIN_DIR}/bkb_reader.cpp
${KMC_MAIN_DIR}/fastq_reader.cpp
${KMC_MAIN_DIR}/timer.cpp
${KMC_MAIN_DIR}/develop.cpp
${KMC_MAIN_DIR}/kb_completer.cpp
${KMC_MAIN_DIR}/kb_storer.cpp
${KMC_MAIN_DIR}/kmer.cpp
${KMC_MAIN_DIR}/splitter.cpp
${KMC_MAIN_DIR}/kb_collector.cpp
${KMC_MAIN_DIR}/../kmc_api/mmer.cpp
${KMC_MAIN_DIR}/../kmc_api/kmc_file.cpp
${KMC_MAIN_DIR}/../kmc_api/kmer_api.cpp
)
file(GLOB RADULS_files
${KMC_MAIN_DIR}/raduls_sse2.cpp
${KMC_MAIN_DIR}/raduls_sse41.cpp
${KMC_MAIN_DIR}/raduls_avx2.cpp
${KMC_MAIN_DIR}/raduls_avx.cpp
)
set_source_files_properties(${KMC_MAIN_DIR}/raduls_sse2.cpp
PROPERTIES COMPILE_FLAGS "-msse2")
set_source_files_properties(${KMC_MAIN_DIR}/raduls_sse41.cpp
PROPERTIES COMPILE_FLAGS "-msse4.1")
set_source_files_properties(${KMC_MAIN_DIR}/raduls_avx.cpp
PROPERTIES COMPILE_FLAGS "-mavx")
set_source_files_properties(${KMC_MAIN_DIR}/raduls_avx2.cpp
PROPERTIES COMPILE_FLAGS "-mavx2 -mfma")
add_library(KMCcore STATIC
${KMC_files}
${RADULS_files}
)
target_link_libraries(KMCcore
)
add_custom_target(link_target ALL
COMMAND ${CMAKE_COMMAND} -E
create_symlink "libKMCcore.a" "libKMC.a"
DEPENDS KMCcore
)
if(@BUILD_KMC@)
add_executable(kmc
${KMC_MAIN_DIR}/kmer_counter.cpp
)
target_link_libraries(kmc
KMCcore
-lz -lbz2 -lpthread
)
endif()