-
Notifications
You must be signed in to change notification settings - Fork 71
/
Copy pathCMakeLists.txt
60 lines (51 loc) · 1.64 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 (C) The Software Authors. All rights reserved.
##
## \file CMakeLists.txt
## \author xiaoxin.gxx
## \date Nov 2020
## \version 1.0
## \brief Detail cmake build script
##
cmake_minimum_required(VERSION 3.1)
cmake_policy(SET CMP0048 NEW)
project(proxima-be-project)
include(cmake/bazel.cmake)
add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)
# Install benchmark tools
execute_process(
COMMAND ${CMAKE_COMMAND} -E create_symlink
${CMAKE_CURRENT_SOURCE_DIR}/benchmark ${CMAKE_CURRENT_BINARY_DIR}/benchmark
)
# Install git hooks
execute_process(
COMMAND sh scripts/install-git-hooks.sh
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
cc_directory(deps/thirdparty)
cc_directory(deps/proxima/)
get_property(PROXIMA_LIB GLOBAL PROPERTY proxima_lib_property)
set(LIB_PATH "${PROXIMA_LIB}:$ORIGIN/../lib64:$ORIGIN/../lib:$ORIGIN")
cc_directories(src tests sdk tools)
if (ENABLE_LOCAL_INTEGRATION)
add_custom_command(OUTPUT integration_test
COMMAND bash tests/integration/run.sh local
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
COMMENT "Running integration tests"
VERBATIM
)
else()
add_custom_command(OUTPUT integration_test
COMMAND bash tests/integration/run.sh docker
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
COMMENT "Running integration tests"
VERBATIM
)
endif()
add_custom_target(integration DEPENDS integration_test)
# install conf files
install(FILES scripts/conf/proxima_be.conf DESTINATION ${CMAKE_INSTALL_BINDIR}/../conf)
git_version(GIT_SRCS_VER ${CMAKE_CURRENT_SOURCE_DIR})
set(CPACK_PACKAGE_VERSION ${GIT_SRCS_VER})
set(CPACK_PACKAGE_NAME proxima-be)
include(CPack)