2018-09-11 15:27:47 -07:00
|
|
|
# Copyright (c) Facebook, Inc. and its affiliates.
|
2016-07-25 06:31:32 -07:00
|
|
|
#
|
2018-02-16 18:24:55 -08:00
|
|
|
# This source code is licensed under the MIT license found in the
|
|
|
|
# LICENSE file in the root directory of this source tree.
|
2018-08-28 21:54:41 -07:00
|
|
|
load("//tools/build_defs/oss:yoga_defs.bzl", "BASE_COMPILER_FLAGS", "GTEST_TARGET", "LIBRARY_COMPILER_FLAGS", "subdir_glob", "yoga_cxx_library", "yoga_cxx_test", "yoga_dep")
|
2016-07-25 06:31:32 -07:00
|
|
|
|
|
|
|
GMOCK_OVERRIDE_FLAGS = [
|
2017-02-24 21:40:45 -08:00
|
|
|
# gmock does not mark mocked methods as override, ignore the warnings in tests
|
|
|
|
"-Wno-inconsistent-missing-override",
|
2016-07-25 06:31:32 -07:00
|
|
|
]
|
|
|
|
|
2017-03-17 10:49:59 -07:00
|
|
|
COMPILER_FLAGS = LIBRARY_COMPILER_FLAGS + [
|
2017-11-21 10:10:30 -08:00
|
|
|
"-std=c++1y",
|
2017-02-24 21:40:45 -08:00
|
|
|
]
|
|
|
|
|
2017-12-05 08:16:49 -08:00
|
|
|
TEST_COMPILER_FLAGS = BASE_COMPILER_FLAGS + GMOCK_OVERRIDE_FLAGS + [
|
|
|
|
"-std=c++1y",
|
|
|
|
]
|
2016-07-25 06:31:32 -07:00
|
|
|
|
2018-04-14 12:39:23 -07:00
|
|
|
yoga_cxx_library(
|
2017-02-24 21:40:45 -08:00
|
|
|
name = "yoga",
|
2017-11-21 10:10:30 -08:00
|
|
|
srcs = glob(["yoga/*.cpp"]),
|
2018-12-14 09:20:27 -08:00
|
|
|
headers = subdir_glob([("", "yoga/**/*.h")]),
|
2017-02-24 21:40:45 -08:00
|
|
|
header_namespace = "",
|
2017-09-25 10:10:19 -07:00
|
|
|
exported_headers = subdir_glob([("", "yoga/*.h")]),
|
|
|
|
compiler_flags = COMPILER_FLAGS,
|
2017-02-24 21:40:45 -08:00
|
|
|
soname = "libyogacore.$(ext)",
|
|
|
|
tests = [":YogaTests"],
|
|
|
|
visibility = ["PUBLIC"],
|
2017-12-13 14:43:19 -08:00
|
|
|
deps = [
|
2017-02-24 21:40:45 -08:00
|
|
|
yoga_dep("lib/fb:ndklog"),
|
|
|
|
],
|
2016-07-25 06:31:32 -07:00
|
|
|
)
|
|
|
|
|
2018-04-14 12:39:23 -07:00
|
|
|
yoga_cxx_test(
|
2017-02-24 21:40:45 -08:00
|
|
|
name = "YogaTests",
|
|
|
|
srcs = glob(["tests/*.cpp"]),
|
2018-12-14 09:20:27 -08:00
|
|
|
headers = subdir_glob([("", "yoga/**/*.h")]),
|
2017-02-24 21:40:45 -08:00
|
|
|
compiler_flags = TEST_COMPILER_FLAGS,
|
|
|
|
contacts = ["emilsj@fb.com"],
|
|
|
|
visibility = ["PUBLIC"],
|
|
|
|
deps = [
|
|
|
|
":yoga",
|
|
|
|
GTEST_TARGET,
|
|
|
|
],
|
2016-07-25 06:31:32 -07:00
|
|
|
)
|