blob: 1f9f24ffa20c294dcba25d9bc8969d6062c901b1 [file] [log] [blame]
# Copyright 2020 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
config("includes") {
include_dirs = [ "include" ]
}
static_library("cppdap") {
sources = [
"src/chan.h",
"src/content_stream.cpp",
"src/content_stream.h",
"src/io.cpp",
"src/json_serializer.h",
"src/network.cpp",
"src/null_json_serializer.cpp",
"src/protocol_events.cpp",
"src/protocol_requests.cpp",
"src/protocol_response.cpp",
"src/protocol_types.cpp",
"src/rapid_json_serializer.cpp",
"src/rwmutex.h",
"src/session.cpp",
"src/socket.cpp",
"src/socket.h",
"src/string_buffer.h",
"src/typeinfo.cpp",
"src/typeof.cpp",
]
cflags = [ "-DCPPDAP_JSON_RAPID" ]
public_configs = [ ":includes" ]
deps = [ "//third_party/rapidjson" ]
}
if (is_host) {
executable("json_test") {
testonly = true
sources = [
"src/json_serializer_test.cpp",
"src/null_json_serializer.cpp",
"src/rapid_json_serializer.cpp",
"src/typeinfo.cpp",
"src/typeof.cpp",
]
cflags = [ "-DCPPDAP_JSON_RAPID" ]
public_configs = [ ":includes" ]
deps = [
# TODO(fxbug.dev/57392): Move it back to //third_party once unification completes.
"//src/lib/fxl/test:gtest_main",
"//third_party/googletest:gmock",
"//third_party/googletest:gtest",
"//zircon/third_party/rapidjson",
]
}
}
group("tests") {
testonly = true
deps = [ ":json_test($host_toolchain)" ]
}