-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
73 lines (60 loc) · 2.26 KB
/
Copy pathCMakeLists.txt
File metadata and controls
73 lines (60 loc) · 2.26 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
64
65
66
67
68
69
70
71
72
73
CMAKE_MINIMUM_REQUIRED (VERSION 3.13)
PROJECT (cbft)
# This project is intended to be built as part of a Couchbase Server build,
# but for nominal support building stand-alone, the following variables
# need to be specified:
#
# CMAKE_MODULE_PATH - should contain a directory containing
# FindCouchbaseGo.cmake, eg. tlm/cmake/Modules
#
# CMAKE_INSTALL_PREFIX - should point to a directory where the bin/ output
# directory will be placed
#
# GODEPSDIR - should point to a Go workspace directory containing all
# transitive Go dependencies
SET (FTS_DEFAULT "server")
INCLUDE (FindCouchbaseGo)
SET (FTS_DEPENDS)
SET (CGO_INCLUDE_DIRS)
SET (CGO_LIBRARY_DIRS)
IF (BUILD_ENTERPRISE)
SET (BUILD_TAG "enterprise")
SET (NEWEVAL_DIR ../eventing-ee/evaluator)
find_path(NEWEVAL_INCLUDE_DIR worker.h
HINTS ${NEWEVAL_DIR}/worker/include)
LIST(PREPEND CGO_LIBRARY_DIRS "${evaluator_BINARY_DIR}")
LIST(PREPEND CGO_INCLUDE_DIRS "${NEWEVAL_INCLUDE_DIR}")
LIST(APPEND FTS_DEPENDS jseval)
IF (CB_USE_FAISS)
IF (NOT WIN32)
SET (BUILD_TAG "${BUILD_TAG} jemalloc vectors")
IF (ENABLE_CUDA_GPU AND NOT APPLE)
SET (BUILD_TAG "${BUILD_TAG} gpu")
ENDIF()
LIST (APPEND FTS_DEPENDS Jemalloc::noprefix faiss_c)
ENDIF()
ENDIF ()
ENDIF(BUILD_ENTERPRISE)
LIST (APPEND FTS_DEPENDS sigar)
LIST (APPEND FTS_DEPENDS OpenSSL::SSL)
SET (GOVERSION SUPPORTED_NEWER)
GoModBuild (TARGET cbft PACKAGE github.com/couchbase/cbft/cmd/cbft
GOTAGS "${FTS_DEFAULT} ${BUILD_TAG}"
INSTALL_PATH bin OUTPUT cbft
DEPENDS ${FTS_DEPENDS}
CGO_INCLUDE_DIRS "${CGO_INCLUDE_DIRS}"
CGO_LIBRARY_DIRS "${CGO_LIBRARY_DIRS}"
GOVERSION ${GOVERSION})
GoModBuild (TARGET cbft-bleve PACKAGE github.com/couchbase/cbft/cmd/cbft-bleve
GOTAGS "${FTS_DEFAULT} ${BUILD_TAG}"
INSTALL_PATH bin
DEPENDS ${FTS_DEPENDS}
CGO_INCLUDE_DIRS "${CGO_INCLUDE_DIRS}"
CGO_LIBRARY_DIRS "${CGO_LIBRARY_DIRS}"
GOVERSION ${GOVERSION})
# Build the UI and copy the files to the correct place
ADD_SUBDIRECTORY(ns_server_static)
AddMetricsMetadata (JSON etc/metrics_metadata.json COMPONENT fts)
# Generate pluggable-ui-fts.cluster_run.json file for cluster_run.
SET (GODEPS_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../godeps/src/github.com")
GoModTidySetup()