-
Notifications
You must be signed in to change notification settings - Fork 852
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
46 lines (39 loc) · 1.83 KB
/
CMakeLists.txt
File metadata and controls
46 lines (39 loc) · 1.83 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
#######################
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
# agreements. See the NOTICE file distributed with this work for additional information regarding
# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under the License
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
# or implied. See the License for the specific language governing permissions and limitations under
# the License.
#
#######################
add_library(inkhostdb STATIC HostDB.cc RefCountCache.cc HostFile.cc HostDBInfo.cc)
add_library(ts::inkhostdb ALIAS inkhostdb)
target_link_libraries(inkhostdb PUBLIC ts::inkdns ts::inkevent ts::tscore)
clang_tidy_check(inkhostdb)
if(BUILD_TESTING)
add_executable(benchmark_HostDB benchmark_HostDB.cc)
target_link_libraries(
benchmark_HostDB
PRIVATE ts::tscore
ts::tsutil
ts::inkevent
ts::http
ts::http_remap
ts::inkcache
ts::inkhostdb
)
add_executable(test_hostdb_HostFile test_HostFile.cc HostFile.cc HostDBInfo.cc)
target_link_libraries(test_hostdb_HostFile PRIVATE ts::tscore ts::tsutil ts::inkevent Catch2::Catch2WithMain)
add_catch2_test(NAME test_hostdb_HostFile)
add_executable(test_hostdb_RefCountCache test_RefCountCache.cc)
target_link_libraries(test_hostdb_RefCountCache PRIVATE ts::tscore ts::tsutil ts::inkevent Catch2::Catch2WithMain)
add_test(NAME test_hostdb_RefCountCache COMMAND test_hostdb_RefCountCache)
endif()