forked from aymara/lima
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
61 lines (49 loc) · 1.76 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
# Copyright 2021 CEA LIST
#
# This file is part of LIMA.
#
# LIMA is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# LIMA is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with LIMA. If not, see <https://www.gnu.org/licenses/>
cmake_minimum_required(VERSION 3.10)
project(
DeepLima
VERSION 0.1
DESCRIPTION "DNN-base implementation of NL parsing"
LANGUAGES CXX
)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
set(CMAKE_CXX_EXTENSIONS OFF)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
endif()
message("${CMAKE_PREFIX_PATH}")
message("${CMAKE_SYSTEM_PREFIX_PATH}")
set(Boost_USE_STATIC_LIBS ON)
find_package(Boost 1.46 REQUIRED COMPONENTS program_options filesystem)
find_package(ICU 60.0 REQUIRED COMPONENTS uc)
find_package(Eigen3 3.3 REQUIRED NO_MODULE)
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
set(DEEPLIMA_STANDALONE ON)
find_package(Torch REQUIRED)
add_subdirectory(../extern "${CMAKE_BINARY_DIR}/extern")
include_directories(../extern)
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TORCH_CXX_FLAGS}")
include_directories(AFTER "include")
include_directories(AFTER "libs")
add_subdirectory(libs)
add_subdirectory(apps)
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
add_subdirectory(tests)
endif()