-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
44 lines (36 loc) · 1.78 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
cmake_minimum_required(VERSION 3.5)
project(statNLP)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
# compiler optimization, -O3 is the highest level.
set(CMAKE_CXX_FLAGS -pthread)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I /usr/local/include -O0")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -O0")
# include the dynet
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/dynet)
# set the directory of eign3
#set(EIGEN3_INCLUDE_DIR "/Users/ngs/Documents/cplusproject/eigen" )
set(EIGEN3_INCLUDE_DIR "dynet/eigen" )
IF( NOT EIGEN3_INCLUDE_DIR )
MESSAGE( FATAL_ERROR "Please point the environment variable EIGEN3_INCLUDE_DIR to the include directory of your Eigen3 installation.")
ENDIF()
include_directories ( "${EIGEN3_INCLUDE_DIR}" )
# look for Boost
set(Boost_REALPATH ON)
find_package(Boost COMPONENTS program_options iostreams serialization REQUIRED)
include_directories(${Boost_INCLUDE_DIR})
set(LIBS ${LIBS} ${Boost_LIBRARIES})
#find_package(BLAS REQUIRED)
# add subdirectory and the library
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/dynet/dynet)
add_subdirectory(${PROJECT_SOURCE_DIR}/src/neural statnlp_neural_lib)
add_subdirectory(${PROJECT_SOURCE_DIR}/src/hybridnetworks statnlp_hypernetworks_lib)
add_subdirectory(${PROJECT_SOURCE_DIR}/src/common/opt statnlp_opt_lib)
add_subdirectory(${PROJECT_SOURCE_DIR}/src/common/types statnlp_type_lib)
add_subdirectory(${PROJECT_SOURCE_DIR}/src/example/LinearCRF)
add_subdirectory(${PROJECT_SOURCE_DIR}/src/example/LinearNER)
add_subdirectory(${PROJECT_SOURCE_DIR}/src/example/ParsingCRF)
add_subdirectory(${PROJECT_SOURCE_DIR}/src/example/LatentNER)
add_subdirectory(${PROJECT_SOURCE_DIR}/src/example/Test)