-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
63 lines (55 loc) · 1.31 KB
/
CMakeLists.txt
File metadata and controls
63 lines (55 loc) · 1.31 KB
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
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
project(coconut)
# findpackage(blaze) does not work
include("${CMAKE_CURRENT_LIST_DIR}/external/blaze/build/cmake/blaze-targets.cmake")
find_package(avro REQUIRED)
#
# This target doesn't do anything, but anything that depends on this will always be rebuilt.
#
add_custom_command(
OUTPUT always_rebuild
COMMAND cmake -E echo
)
#
# Make the generator program
#
add_executable(coconut-gen
coconut-gen.cpp
)
target_link_libraries(coconut-gen
avrocpp
)
#
# Use the generator to make the main, and make that
#
add_custom_command(
OUTPUT coconut-server.cpp
COMMAND coconut-gen "${CMAKE_CURRENT_LIST_DIR}/weights.avro"
always_rebuild
)
add_executable(coconut-server
coconut-server.cpp
gen-cpp/QuestionAnswering.h
gen-cpp/QuestionAnswering.cpp
gen-cpp/qa_constants.cpp
gen-cpp/qa_types.cpp
)
target_link_libraries(coconut-server
blaze::blaze
thrift
)
add_executable(coconut-client
coconut-client.cpp
gen-cpp/QuestionAnswering.h
gen-cpp/QuestionAnswering.cpp
gen-cpp/qa_constants.cpp
gen-cpp/qa_types.cpp
)
target_link_libraries(coconut-client
thrift
)