-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
71 lines (57 loc) · 1.57 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
cmake_minimum_required(VERSION 3.5)
set(CUDA_TOOLKIT_ROOT_DIR /usr/local/cuda)
project(BLASTP LANGUAGES CXX C CUDA)
SET(CMAKE_BUILD_TYPE "Release")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -pthread")
if (NOT ("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8"))
message(SEND_ERROR "require 64 bit system")
endif()
if (CMAKE_BUILD_TYPE MATCHES Debug)
message(STATUS "DEBUG MODE")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -O0 -lineinfo -g")
else()
message(STATUS "RELEASE MODE")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -O3")
endif()
find_package(OpenMP)
message(STATUS "Use CPU local alignment")
set(SOURCES_UTIL
src/banded_smith_cpu.cpp
src/util.cpp
src/qit.cpp
src/output.cpp
)
set(SOURCES_SEARCH
src/hash_table.cu
src/blastp.cu
src/query_group.cu
)
set(SOURCES_CUDATOOL
src/cudaTool.cu
)
add_library(util STATIC ${SOURCES_UTIL})
target_include_directories(util PRIVATE
${PROJECT_SOURCE_DIR}/include
)
target_link_libraries(util PRIVATE ${OpenMP_CXX_LIBRARIES})
target_include_directories (util
PRIVATE
${OpenMP_CXX_INCLUDE_DIRS}
)
target_compile_options (util
PRIVATE
${OpenMP_CXX_FLAGS}
)
add_executable(query src/main.cpp ${SOURCES_SEARCH})
target_link_libraries(query util)
add_executable(createDB src/createDB.cpp ${SOURCES_CUDATOOL})
target_include_directories(query
PRIVATE
${PROJECT_SOURCE_DIR}/include
)
target_include_directories(createDB
PRIVATE
${PROJECT_SOURCE_DIR}/include
)