2016-07-25 06:31:32 -07:00
|
|
|
# Copyright (c) 2014-present, Facebook, Inc.
|
|
|
|
# All rights reserved.
|
|
|
|
#
|
|
|
|
# This source code is licensed under the BSD-style license found in the
|
|
|
|
# LICENSE file in the root directory of this source tree. An additional grant
|
|
|
|
# of patent rights can be found in the PATENTS file in the same directory.
|
|
|
|
|
2016-12-02 05:08:55 -08:00
|
|
|
include_defs('//YOGA_DEFS')
|
2016-07-25 06:31:32 -07:00
|
|
|
|
|
|
|
GMOCK_OVERRIDE_FLAGS = [
|
|
|
|
# gmock does not mark mocked methods as override, ignore the warnings in tests
|
|
|
|
'-Wno-inconsistent-missing-override',
|
|
|
|
]
|
|
|
|
|
2016-11-28 09:18:12 -08:00
|
|
|
COMPILER_FLAGS = BASE_COMPILER_FLAGS + ['-std=c11', '-fPIC']
|
2016-07-25 06:31:32 -07:00
|
|
|
TEST_COMPILER_FLAGS = BASE_COMPILER_FLAGS + GMOCK_OVERRIDE_FLAGS + ['-std=c++11']
|
|
|
|
|
|
|
|
cxx_library(
|
2016-12-07 05:12:11 -08:00
|
|
|
name = 'yoga',
|
2016-12-07 16:18:13 +00:00
|
|
|
soname = 'libyogacore.$(ext)',
|
2016-12-07 05:12:11 -08:00
|
|
|
srcs = glob(['yoga/*.c']),
|
2016-12-10 17:31:11 -08:00
|
|
|
tests=[':YogaTests'],
|
2016-12-07 05:12:11 -08:00
|
|
|
exported_headers = subdir_glob([('', 'yoga/*.h')]),
|
2016-07-25 06:31:32 -07:00
|
|
|
header_namespace = '',
|
|
|
|
compiler_flags = COMPILER_FLAGS,
|
2016-12-02 05:08:57 -08:00
|
|
|
deps = [] if THIS_IS_FBOBJC else [
|
2016-12-07 05:12:11 -08:00
|
|
|
yoga_dep('lib/fb:ndklog'),
|
2016-12-02 05:08:57 -08:00
|
|
|
],
|
2016-07-25 06:31:32 -07:00
|
|
|
visibility = ['PUBLIC'],
|
|
|
|
)
|
|
|
|
|
|
|
|
cxx_test(
|
2016-12-10 17:31:11 -08:00
|
|
|
name = 'YogaTests',
|
2016-07-25 06:31:32 -07:00
|
|
|
contacts = ['emilsj@fb.com'],
|
|
|
|
srcs = glob(['tests/*.cpp']),
|
|
|
|
compiler_flags = TEST_COMPILER_FLAGS,
|
|
|
|
deps = [
|
2016-12-07 05:12:11 -08:00
|
|
|
':yoga',
|
2016-07-25 06:31:32 -07:00
|
|
|
GTEST_TARGET,
|
|
|
|
],
|
|
|
|
visibility = ['PUBLIC'],
|
|
|
|
)
|