From 9dac56e824c4d7aaa5c2e84f269537ed89293e72 Mon Sep 17 00:00:00 2001 From: Stiopa Koltsov Date: Sat, 15 Jun 2019 12:03:49 -0700 Subject: [PATCH] Migrate Yoga targets to `raw_headers` Summary: In "regular" header mode, Buck will symlink from `buck-out/` to the actual header file. This works fine with GCC and clang, but not with MSVC. Headers will be treated as different file, sidestepping `#pragma once` directives. As a result, all kinds of symbols get declared twice, leading to compile errors. Reviewed By: davidaurelio Differential Revision: D15781947 fbshipit-source-id: a3b4e211b8b74b9ef44fc39471a3009b2cf47260 --- BUCK | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/BUCK b/BUCK index 5af52a2f..e11649b9 100644 --- a/BUCK +++ b/BUCK @@ -17,9 +17,9 @@ TEST_COMPILER_FLAGS = BASE_COMPILER_FLAGS + GMOCK_OVERRIDE_FLAGS + [ yoga_cxx_library( name = "yoga", srcs = glob(["yoga/**/*.cpp"]), - header_namespace = "", - exported_headers = subdir_glob([("", "yoga/**/*.h")]), compiler_flags = LIBRARY_COMPILER_FLAGS, + public_include_directories = ["."], + raw_headers = glob(["yoga/**/*.h"]), soname = "libyogacore.$(ext)", tests = [":YogaTests"], visibility = ["PUBLIC"], @@ -31,9 +31,9 @@ yoga_cxx_library( yoga_cxx_library( name = "yogaForDebug", srcs = glob(["yoga/**/*.cpp"]), - header_namespace = "", - exported_headers = subdir_glob([("", "yoga/**/*.h")]), compiler_flags = TEST_COMPILER_FLAGS, + public_include_directories = ["."], + raw_headers = glob(["yoga/**/*.h"]), soname = "libyogacore.$(ext)", tests = [":YogaTests"], visibility = ["PUBLIC"],