Skip to content

Commit 7b9e498

Browse files
authored
Merge pull request #62 from zintus/yoga-core
[WIP] Update yoga core to latest master
2 parents df3eee6 + e4dba12 commit 7b9e498

File tree

477 files changed

+188012
-3929
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

477 files changed

+188012
-3929
lines changed

.buckconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[cxx]
2+
gtest_dep = //lib/gtest:gtest

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,11 @@ Carthage/Build/iOS/*.dSYM
1414
Carthage/Build/iOS/*.bcsymbolmap
1515
Carthage/Build/tvOS
1616
Carthage/Checkouts
17+
18+
# Buck
19+
/buck-cache/
20+
/buck-out/
21+
/.buckconfig.local
22+
/.buckd
23+
/gentest/test.html
24+
.buckversion

.travis.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
language: objective-c
22
osx_image: xcode9.2
33

4+
cache:
5+
directories:
6+
- buck-out/cache
7+
48
before_install:
9+
# Update homebrew and ensure our bundle
10+
- brew update && brew bundle
11+
512
# - rvm use $RVM_RUBY_VERSION
613
- bundle install
714
- gem install xcpretty-travis-formatter;
@@ -11,6 +18,7 @@ before_install:
1118
# - carthage bootstrap --verbose --platform iOS --cache-builds --use-ssh
1219

1320
script:
21+
- buck test :yoga
1422
- set -o pipefail && bundle exec fastlane travis
1523

1624
after_success:

BUCK

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Copyright (c) 2014-present, Facebook, Inc.
2+
#
3+
# This source code is licensed under the MIT license found in the
4+
# LICENSE file in the root directory of this source tree.
5+
6+
load("//:yoga_defs.bzl", "LIBRARY_COMPILER_FLAGS", "BASE_COMPILER_FLAGS", "GTEST_TARGET", "yoga_dep", "cxx_library", "cxx_test")
7+
8+
GMOCK_OVERRIDE_FLAGS = [
9+
# gmock does not mark mocked methods as override, ignore the warnings in tests
10+
"-Wno-inconsistent-missing-override",
11+
]
12+
13+
COMPILER_FLAGS = LIBRARY_COMPILER_FLAGS + [
14+
"-std=c++1y",
15+
]
16+
17+
TEST_COMPILER_FLAGS = BASE_COMPILER_FLAGS + GMOCK_OVERRIDE_FLAGS + [
18+
"-std=c++1y",
19+
]
20+
21+
cxx_library(
22+
name = "yoga",
23+
srcs = glob(["Sources/yoga/*.cpp"]),
24+
header_namespace = "yoga",
25+
exported_headers = subdir_glob([("Sources/yoga", "*.h")]),
26+
compiler_flags = COMPILER_FLAGS,
27+
soname = "libyogacore.$(ext)",
28+
tests = [":YogaTests"],
29+
visibility = ["PUBLIC"],
30+
deps = [
31+
yoga_dep("lib/fb:ndklog"),
32+
],
33+
)
34+
35+
cxx_test(
36+
name = "YogaTests",
37+
srcs = glob(["core-tests/*.cpp"]),
38+
compiler_flags = TEST_COMPILER_FLAGS,
39+
contacts = ["[email protected]"],
40+
visibility = ["PUBLIC"],
41+
deps = [
42+
":yoga",
43+
GTEST_TARGET,
44+
],
45+
)

Brewfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
tap 'facebook/fb'
2+
brew 'buck'

FlexLayout.podspec

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,17 @@ Pod::Spec.new do |spec|
1414
spec.platform = :ios, "9.0"
1515

1616
spec.source = { :git => "https://github.com/lucdion/FlexLayout.git", :tag => "#{spec.version}" }
17-
spec.source_files = "Sources/**/*.{swift,h,m,cpp,c}"
17+
spec.source_files = "Sources/**/*.{swift,h,m,mm,cpp,c}"
18+
spec.public_header_files = "Sources/yoga/{Yoga,YGEnums,YGMacros}.h", "Sources/YogaKit/{UIView+Yoga,YGLayout}.h"
1819

19-
#spec.compiler_flags = [
20-
# '-fno-omit-frame-pointer',
21-
# '-fexceptions',
22-
# '-Wall',
23-
# '-Werror',
24-
# '-std=c11',
25-
# '-fPIC'
26-
#]
20+
21+
# Should match yoga_defs.bzl + BUCK configuration
22+
spec.compiler_flags = [
23+
'-fno-omit-frame-pointer',
24+
'-fexceptions',
25+
'-Wall',
26+
'-Werror',
27+
'-std=c++1y',
28+
'-fPIC'
29+
]
2730
end

FlexLayout.xcodeproj/project.pbxproj

Lines changed: 72 additions & 36 deletions
Large diffs are not rendered by default.

FlexLayout.xcworkspace/contents.xcworkspacedata

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Sources/SupportingFiles/FlexLayout.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,3 @@ FOUNDATION_EXPORT const unsigned char FlexLayoutVersionString[];
2727
#import "Yoga.h"
2828
#import "YGEnums.h"
2929
#import "YGMacros.h"
30-
#import "YGMacros.h"
31-
32-
33-
34-
35-
File renamed without changes.

0 commit comments

Comments
 (0)