-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathCMakeLists.txt
78 lines (57 loc) · 2.06 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
74
75
76
project(NNTransitionSegmentor)
include_directories(
basic/
feature/
model/
state/
# please specify where you put mshadow.
# for example, /users/mszhang/mshadow/
/opt/mshadow/
../LibN3L/
)
add_definitions(-DUSE_CUDA=0)
IF(CMAKE_BUILD_TYPE MATCHES Debug)
SET( CMAKE_CXX_FLAGS "-w -msse3 -funroll-loops -O0" )
ELSE()
SET( CMAKE_CXX_FLAGS "-w -msse3 -funroll-loops -O3" )
ENDIF()
####for openblas
add_definitions(-DMSHADOW_USE_CUDA=0)
add_definitions(-DMSHADOW_USE_CBLAS=1)
add_definitions(-DMSHADOW_USE_MKL=0)
SET( CMAKE_SHARED_LINKER_FLAGS "-lm -lopenblas")
####endfor openblas
####for cuda
#add_definitions(-DMSHADOW_USE_CUDA=1)
#add_definitions(-DMSHADOW_USE_CBLAS=1)
#add_definitions(-DMSHADOW_USE_MKL=0)
#SET( CMAKE_SHARED_LINKER_FLAGS "-lm -lcudart -lcublas -lcurand" )
#include_directories(
# $(USE_CUDA_PATH)/include
#)
#LINK_DIRECTORIES($(USE_CUDA_PATH)/lib64)
####endfor cuda
#add_subdirectory(basic)
#aux_source_directory(. DIR_SRCS)
add_executable(LSTMSegmentor LSTMSegmentor.cpp)
add_executable(IntegratedLSTMSegmentor IntegratedLSTMSegmentor.cpp)
add_executable(LinearSegmentor LinearSegmentor.cpp)
target_link_libraries(LSTMSegmentor openblas)
target_link_libraries(IntegratedLSTMSegmentor openblas)
target_link_libraries(LinearSegmentor openblas)
#add_executable(TNNSegmentor TNNSegmentor.cpp)
#add_executable(GRNNSegmentor GRNNSegmentor.cpp)
#add_executable(RNNSegmentor RNNSegmentor.cpp)
#add_executable(LSTMNWSegmentor LSTMNWSegmentor.cpp)
#add_executable(LSTMNASegmentor LSTMNASegmentor.cpp)
#add_executable(LSTMNCSegmentor LSTMNCSegmentor.cpp)
#add_executable(LSTMNUCSegmentor LSTMNUCSegmentor.cpp)
#add_executable(LSTMNBCSegmentor LSTMNBCSegmentor.cpp)
#target_link_libraries(TNNSegmentor openblas)
#target_link_libraries(GRNNSegmentor openblas)
#target_link_libraries(RNNSegmentor openblas)
#target_link_libraries(LSTMNWSegmentor openblas)
#target_link_libraries(LSTMNASegmentor openblas)
#target_link_libraries(LSTMNCSegmentor openblas)
#target_link_libraries(LSTMNUCSegmentor openblas)
#target_link_libraries(LSTMNBCSegmentor openblas)