osquery-1/osquery/utils/BUCK
Alexander Kindyakov 081d5053ee Create OSQUERY_NODISCARD to prevent non returning errors (#5331)
Summary:
Pull Request resolved: https://github.com/facebook/osquery/pull/5331

Let's use attributes to prevent such mistakes (see previous diff in the stack)

Reviewed By: guliashvili

Differential Revision: D13504146

fbshipit-source-id: 7cab2dd345599b036fa2a27bf682f2a159fd1c08
2018-12-19 03:58:50 -08:00

92 lines
2.3 KiB
Python

# Copyright (c) 2014-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under both the Apache 2.0 license (found in the
# LICENSE file in the root directory of this source tree) and the GPLv2 (found
# in the COPYING file in the root directory of this source tree).
# You may select, at your option, one of the above-listed licenses.
load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library", "osquery_cxx_test")
load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target")
load("//tools/build_defs/oss/osquery:platforms.bzl", "FREEBSD", "MACOSX")
load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target")
osquery_cxx_library(
name = "utils",
srcs = [
"base64.cpp",
"chars.cpp",
"only_movable.cpp",
],
header_namespace = "osquery/utils",
exported_headers = [
"attribute.h",
"base64.h",
"chars.h",
"map_take.h",
"mutex.h",
"only_movable.h",
"scope_guard.h",
],
exported_platform_headers = [
(
MACOSX,
[
"darwin/plist.h",
],
),
],
exported_post_platform_linker_flags = [
(
FREEBSD,
[
"-lglog",
],
),
],
platform_srcs = [
(
MACOSX,
[
"darwin/plist.mm",
],
),
],
tests = [":utils_tests"],
visibility = ["PUBLIC"],
deps = [
osquery_tp_target("glog"),
],
exported_deps = [
osquery_target("osquery/logger:logger"),
osquery_target("osquery/utils/config:config"),
osquery_target("osquery/utils/conversions:conversions"),
osquery_target("osquery/utils/expected:expected"),
osquery_target("osquery/utils/info:info"),
osquery_target("osquery/utils/status:status"),
],
)
osquery_cxx_test(
name = "utils_tests",
srcs = [
"tests/base64.cpp",
"tests/chars.cpp",
"tests/map_take.cpp",
"tests/scope_guard.cpp",
],
visibility = ["PUBLIC"],
deps = [
":utils",
],
)
osquery_cxx_library(
name = "attribute",
header_namespace = "osquery/utils",
exported_headers = [
"attribute.h",
],
visibility = ["PUBLIC"],
)