Skip to content

Commit 55173fc

Browse files
committed
add CMakeLists file for performance test project
1 parent a062677 commit 55173fc

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
# SPDX-License-Identifier: Apache-2.0.
3+
#
4+
5+
add_project(performance-tests
6+
"A suite of AWS C++ SDK performance tests"
7+
aws-cpp-sdk-core
8+
aws-cpp-sdk-s3
9+
aws-cpp-sdk-dynamodb
10+
)
11+
12+
include(FetchContent)
13+
FetchContent_Declare(
14+
cxxopts
15+
GIT_REPOSITORY https://github.com/jarro2783/cxxopts.git
16+
GIT_TAG v3.1.1
17+
)
18+
FetchContent_MakeAvailable(cxxopts)
19+
20+
function(add_service_test SERVICE SDK_LIB PERF_TEST_FILE)
21+
add_executable(${SERVICE}-performance-test
22+
src/services/${SERVICE}/main.cpp
23+
src/reporting/JsonReportingMetrics.cpp
24+
src/services/${SERVICE}/${PERF_TEST_FILE}
25+
)
26+
set_compiler_flags(${SERVICE}-performance-test)
27+
set_compiler_warnings(${SERVICE}-performance-test)
28+
target_include_directories(${SERVICE}-performance-test PRIVATE include)
29+
target_link_libraries(${SERVICE}-performance-test PRIVATE aws-cpp-sdk-core ${SDK_LIB} cxxopts::cxxopts)
30+
target_compile_options(${SERVICE}-performance-test PRIVATE -std=c++17 -fexceptions)
31+
endfunction()
32+
33+
add_service_test(s3 aws-cpp-sdk-s3 S3PerformanceTest.cpp)
34+
add_service_test(dynamodb aws-cpp-sdk-dynamodb DynamoDBPerformanceTest.cpp)

0 commit comments

Comments
 (0)