-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
executable file
·74 lines (60 loc) · 1.86 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
72
73
cmake_minimum_required(VERSION 3.7 FATAL_ERROR)
project(AnySeq)
find_package(AnyDSL_runtime REQUIRED)
include_directories(${AnyDSL_runtime_INCLUDE_DIRS})
set(ANYDSL_RUNTIME_LIBRARIES ${AnyDSL_runtime_LIBRARIES})
set(BACKEND ${BACKEND} CACHE STRING "select the backend from the following: CPU, AVX, NVVM, CUDA, OPENCL")
if(NOT BACKEND)
set(BACKEND cpu CACHE STRING "select the backend from the following: CPU, AVX, NVVM, CUDA, OPENCL" FORCE)
endif()
string(TOLOWER "${BACKEND}" BACKEND)
message(STATUS "Selected backend: ${BACKEND}")
set(BACKEND_FILE src/backend/backend_${BACKEND}.impala)
if(BACKEND STREQUAL "cpu")
set(DEVICE "cpu")
set(DEVICE_COMM "cpu")
elseif(BACKEND STREQUAL "avx")
set(DEVICE "avx")
set(DEVICE_COMM "cpu")
else()
set(DEVICE "gpu")
set(DEVICE_COMM "gpu")
endif()
# Don't change the order of the files!
# The impala compiler crashes sometimes depending on
# the definition order of "static" constants.
anydsl_runtime_wrap(ANYSEQ_PROGRAM FILES
${BACKEND_FILE}
src/mapping_${DEVICE_COMM}.impala
src/scoring_${DEVICE_COMM}.impala
src/iteration_${DEVICE}.impala
src/iteration.impala
src/limits.impala
src/print.impala
src/timing.impala
src/utils.impala
src/indexing.impala
src/align.impala
src/matrix.impala
src/export.impala
src/predecessors.impala
src/scoring.impala
src/sequence.impala
src/traceback.impala
src/concurrent_queue.impala
src/config.impala
src/config_${DEVICE}.impala
)
add_executable(align
src/main.cpp
src/alignment_io.cpp
src/sequence_io.cpp
src/concurrent_queue.cpp
${ANYSEQ_PROGRAM}
)
target_link_libraries(align
${ANYDSL_RUNTIME_LIBRARY}
${ANYDSL_RUNTIME_LIBRARIES}
-pthread # needed for the queuing stuff
)
set_target_properties(align PROPERTIES CXX_STANDARD 14 CXX_STANDARD_REQUIRED ON)