blob: fbfea65f75cafaee3b520e6dad05f70a29d9feef [file] [log] [blame]
# Copyright 2014 The Goma 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("base_config") {
include_dirs = [ "." ]
}
static_library("base") {
sources = [
"basictypes.h",
"compiler_specific.h",
"file_dir.cc",
"file_dir.h",
"filesystem.cc",
"filesystem.h",
"lockhelper.cc",
"lockhelper.h",
"options.cc",
"options.h",
"path.cc",
"path.h",
"status.h",
]
deps = [
"//third_party:glog",
]
public_deps = [
"//third_party/abseil",
"//third_party/chromium_base:platform_thread",
]
if (os == "win") {
sources += [
"config_win.h",
"socket_helper_win.cc",
"socket_helper_win.h",
]
cflags = [
# These warnings come from int and SOCKET type mismatch.
"/wd4309", # Truncation of constant value
]
}
public_configs = [ ":base_config" ]
}
static_library("goma_unittest") {
testonly = true
sources = [
"goma_unittest.cc",
]
deps = [
":base",
"//third_party:gtest",
]
}
executable("lockhelper_unittest") {
testonly = true
sources = [
"lockhelper_unittest.cc",
]
deps = [
":base",
":goma_unittest",
"//build/config:exe_and_shlib_deps",
"//third_party:glog",
"//third_party:gtest",
]
}
executable("filesystem_unittest") {
testonly = true
sources = [
"filesystem_unittest.cc",
]
deps = [
":base",
":goma_unittest",
"//build/config:exe_and_shlib_deps",
"//third_party:glog",
"//third_party:gtest",
]
}
if (os == "win") {
executable("socket_helper_win_unittest") {
testonly = true
sources = [
"socket_helper_win_unittest.cc",
]
deps = [
":base",
":goma_unittest",
"//build/config:exe_and_shlib_deps",
"//third_party:glog",
"//third_party:gtest",
"//third_party/abseil",
]
}
}