Try to fix MSVC Buck Build (#37242)
Summary: X-link: https://github.com/facebook/react-native/pull/37242 Pull Request resolved: https://github.com/facebook/yoga/pull/1278 Reviewed By: yungsters Differential Revision: D45552325 fbshipit-source-id: 5687e8ec27a7a70df66e2f89e800210e3ce21ba3
This commit is contained in:
committed by
Facebook GitHub Bot
parent
f3633a256b
commit
70153cc16c
4
enums.py
4
enums.py
@@ -130,7 +130,7 @@ root = os.path.dirname(os.path.abspath(__file__))
|
||||
with open(root + "/yoga/YGEnums.h", "w") as f:
|
||||
f.write(get_license("cpp"))
|
||||
f.write("#pragma once\n")
|
||||
f.write('#include "YGMacros.h"\n\n')
|
||||
f.write("#include <yoga/YGMacros.h>\n\n")
|
||||
f.write("// clang-format off\n\n\n")
|
||||
|
||||
f.write("YG_EXTERN_C_BEGIN\n\n")
|
||||
@@ -159,7 +159,7 @@ with open(root + "/yoga/YGEnums.h", "w") as f:
|
||||
# write out C body for printing
|
||||
with open(root + "/yoga/YGEnums.cpp", "w") as f:
|
||||
f.write(get_license("cpp"))
|
||||
f.write('#include "YGEnums.h"\n\n')
|
||||
f.write("#include <yoga/YGEnums.h>\n\n")
|
||||
items = sorted(ENUMS.items())
|
||||
for name, values in items:
|
||||
f.write("const char* YG%sToString(const YG%s value) {\n" % (name, name))
|
||||
|
@@ -10,7 +10,8 @@
|
||||
#include <bitset>
|
||||
#include <cstdio>
|
||||
#include <cstdint>
|
||||
#include "YGEnums.h"
|
||||
|
||||
#include <yoga/YGEnums.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace yoga {
|
||||
|
@@ -7,6 +7,13 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cmath>
|
||||
#include <cstdint>
|
||||
#include <limits>
|
||||
|
||||
#include <yoga/YGMacros.h>
|
||||
#include <yoga/YGValue.h>
|
||||
|
||||
#if defined(__has_include) && __has_include(<version>)
|
||||
// needed to be able to evaluate defined(__cpp_lib_bit_cast)
|
||||
#include <version>
|
||||
@@ -20,11 +27,6 @@
|
||||
#else
|
||||
#include <cstring>
|
||||
#endif
|
||||
#include "YGValue.h"
|
||||
#include "YGMacros.h"
|
||||
#include <cmath>
|
||||
#include <cstdint>
|
||||
#include <limits>
|
||||
|
||||
static_assert(
|
||||
std::numeric_limits<float>::is_iec559,
|
||||
|
@@ -7,9 +7,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Yoga-internal.h"
|
||||
#include "Yoga.h"
|
||||
#include <yoga/Yoga.h>
|
||||
|
||||
#include "BitUtils.h"
|
||||
#include "Yoga-internal.h"
|
||||
|
||||
namespace facebook {
|
||||
namespace yoga {
|
||||
|
@@ -7,7 +7,7 @@
|
||||
|
||||
// @generated by enums.py
|
||||
|
||||
#include "YGEnums.h"
|
||||
#include <yoga/YGEnums.h>
|
||||
|
||||
const char* YGAlignToString(const YGAlign value) {
|
||||
switch (value) {
|
||||
|
@@ -8,7 +8,7 @@
|
||||
// @generated by enums.py
|
||||
|
||||
#pragma once
|
||||
#include "YGMacros.h"
|
||||
#include <yoga/YGMacros.h>
|
||||
|
||||
// clang-format off
|
||||
|
||||
|
@@ -6,9 +6,12 @@
|
||||
*/
|
||||
|
||||
#ifdef DEBUG
|
||||
#include "YGNodePrint.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include "YGEnums.h"
|
||||
|
||||
#include <yoga/YGEnums.h>
|
||||
|
||||
#include "YGNodePrint.h"
|
||||
#include "YGNode.h"
|
||||
#include "Yoga-internal.h"
|
||||
#include "Utils.h"
|
||||
|
@@ -11,7 +11,7 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "Yoga.h"
|
||||
#include <yoga/Yoga.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace yoga {
|
||||
|
@@ -11,11 +11,12 @@
|
||||
#include <array>
|
||||
#include <cstdint>
|
||||
#include <type_traits>
|
||||
|
||||
#include <yoga/Yoga.h>
|
||||
|
||||
#include "CompactValue.h"
|
||||
#include "YGEnums.h"
|
||||
#include "YGFloatOptional.h"
|
||||
#include "Yoga-internal.h"
|
||||
#include "Yoga.h"
|
||||
#include "BitUtils.h"
|
||||
|
||||
class YOGA_EXPORT YGStyle {
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#include "YGValue.h"
|
||||
#include <yoga/YGValue.h>
|
||||
|
||||
const YGValue YGValueZero = {0, YGUnitPoint};
|
||||
const YGValue YGValueUndefined = {YGUndefined, YGUnitUndefined};
|
||||
|
@@ -7,8 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "YGEnums.h"
|
||||
#include "YGMacros.h"
|
||||
#include <yoga/YGEnums.h>
|
||||
#include <yoga/YGMacros.h>
|
||||
|
||||
YG_EXTERN_C_BEGIN
|
||||
|
||||
|
@@ -11,8 +11,10 @@
|
||||
#include <array>
|
||||
#include <cmath>
|
||||
#include <vector>
|
||||
|
||||
#include <yoga/Yoga.h>
|
||||
|
||||
#include "CompactValue.h"
|
||||
#include "Yoga.h"
|
||||
|
||||
using YGVector = std::vector<YGNodeRef>;
|
||||
|
||||
|
@@ -5,28 +5,20 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#include "Yoga.h"
|
||||
#include "log.h"
|
||||
#include <float.h>
|
||||
#include <string.h>
|
||||
#include <algorithm>
|
||||
#include <atomic>
|
||||
#include <memory>
|
||||
|
||||
#include <yoga/Yoga.h>
|
||||
|
||||
#include "log.h"
|
||||
#include "Utils.h"
|
||||
#include "YGNode.h"
|
||||
#include "YGNodePrint.h"
|
||||
#include "Yoga-internal.h"
|
||||
#include "event/event.h"
|
||||
#ifdef _MSC_VER
|
||||
#include <float.h>
|
||||
|
||||
/* define fmaxf if < VC12 */
|
||||
#if _MSC_VER < 1800
|
||||
__forceinline const float fmaxf(const float a, const float b) {
|
||||
return (a > b) ? a : b;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
using namespace facebook::yoga;
|
||||
using detail::Log;
|
||||
|
@@ -18,9 +18,9 @@
|
||||
#include <stdbool.h>
|
||||
#endif
|
||||
|
||||
#include "YGEnums.h"
|
||||
#include "YGMacros.h"
|
||||
#include "YGValue.h"
|
||||
#include <yoga/YGEnums.h>
|
||||
#include <yoga/YGMacros.h>
|
||||
#include <yoga/YGValue.h>
|
||||
|
||||
YG_EXTERN_C_BEGIN
|
||||
|
||||
|
@@ -5,9 +5,9 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#include "log.h"
|
||||
#include <yoga/Yoga.h>
|
||||
|
||||
#include "Yoga.h"
|
||||
#include "log.h"
|
||||
#include "YGConfig.h"
|
||||
#include "YGNode.h"
|
||||
|
||||
|
@@ -7,7 +7,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "YGEnums.h"
|
||||
#include <yoga/YGEnums.h>
|
||||
|
||||
struct YGNode;
|
||||
struct YGConfig;
|
||||
|
Reference in New Issue
Block a user