-
Notifications
You must be signed in to change notification settings - Fork 35
/
CMakeLists.txt
55 lines (40 loc) · 1.09 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
cmake_minimum_required(VERSION 2.8)
IF(APPLE)
set(CMAKE_C_COMPILIER /usr/local/bin/gcc)
set(CMAKE_CXX_COMPILER /usr/local/bin/g++)
ENDIF()
project(NNTSegClean)
include_directories(
basic/
feature/
model/
state/
/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(STDSeg STDSeg.cpp)
target_link_libraries(STDSeg openblas)