-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
72 lines (57 loc) · 3.02 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
61
62
63
64
65
66
67
68
69
70
71
72
# ---------------------------------------------------------------------------
# S3 Benchmark
# ---------------------------------------------------------------------------
project(S3Benchmark LANGUAGES C CXX ASM)
cmake_minimum_required(VERSION 3.10.2)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# ---------------------------------------------------------------------------
# Environment
# ---------------------------------------------------------------------------
set(BENCH_LIB_DIR "${CMAKE_SOURCE_DIR}/lib/")
set(BENCH_CLI_DIR "${CMAKE_SOURCE_DIR}/cli/")
# ---------------------------------------------------------------------------
# Dependencies
# ---------------------------------------------------------------------------
include("${CMAKE_SOURCE_DIR}/vendor/googletest.cmake")
include("${CMAKE_SOURCE_DIR}/vendor/cpplint.cmake")
include("${CMAKE_SOURCE_DIR}/vendor/awssdk.cmake")
include("${CMAKE_SOURCE_DIR}/vendor/gflags.cmake")
# ---------------------------------------------------------------------------
# Sources
# ---------------------------------------------------------------------------
include("${BENCH_LIB_DIR}/local.cmake")
if(${BENCH_TARGET} MATCHES "cli")
include("${BENCH_CLI_DIR}/local.cmake")
else()
message(WARN, "BENCH_TARGET not set, only building library")
endif()
include("${CMAKE_SOURCE_DIR}/test/local.cmake")
# ---------------------------------------------------------------------------
# Linting
# ---------------------------------------------------------------------------
add_custom_target(lint)
add_dependencies(lint ${lint_targets})
# ---------------------------------------------------------------------------
# Configuration
# ---------------------------------------------------------------------------
message(STATUS "[S3 BENCHMARK] settings")
message(STATUS " BENCH_LIB_DIR = ${BENCH_LIB_DIR}")
message(STATUS " BENCH_CLI_DIR = ${BENCH_CLI_DIR}")
message(STATUS "[CMAKE] settings")
message(STATUS " CMAKE_SOURCE_DIR = ${CMAKE_SOURCE_DIR}")
message(STATUS " CMAKE_SHARED_LIBRARY_SUFFIX = ${CMAKE_SHARED_LIBRARY_SUFFIX}")
message(STATUS " CMAKE_STATIC_LIBRARY_SUFFIX = ${CMAKE_STATIC_LIBRARY_SUFFIX}")
message(STATUS " CMAKE_SHARED_LIBRARY_PREFIX = ${CMAKE_SHARED_LIBRARY_PREFIX}")
message(STATUS " CMAKE_STATIC_LIBRARY_PREFIX = ${CMAKE_STATIC_LIBRARY_PREFIX}")
message(STATUS "[AWSSDK] settings")
message(STATUS " AWS_INCLUDE_DIR = ${AWS_INCLUDE_DIR}")
message(STATUS " AWS_LINK_LIBRARIES = ${AWS_LINK_LIBRARIES}")
message(STATUS "[CPPLINT] settings")
message(STATUS " CPPLINT_SCRIPT_PATH = ${CPPLINT_SCRIPT_PATH}")
message(STATUS " lint_targets = ${CMAKE_CXX_CPPLINT}")
message(STATUS "[TEST] settings")
message(STATUS " GTEST_INCLUDE_DIR = ${GTEST_INCLUDE_DIR}")
message(STATUS " GTEST_LIBRARY_PATH = ${GTEST_LIBRARY_PATH}")
message(STATUS " GMOCK_INCLUDE_DIR = ${GMOCK_INCLUDE_DIR}")
message(STATUS " GMOCK_LIBRARY_PATH = ${GMOCK_LIBRARY_PATH}")