未验证 提交 2a26bfba 编写于 作者: C Chris Bracken 提交者: GitHub

Define _USE_MATH_DEFINES on Windows where needed (#21166)

上级 f0a622a6
......@@ -174,6 +174,14 @@ if (enable_unittests) {
"//third_party/skia",
]
if (!defined(defines)) {
defines = []
}
if (is_win) {
# Required for M_PI and others.
defines += [ "_USE_MATH_DEFINES" ]
}
if (is_fuchsia && flutter_enable_legacy_fuchsia_embedder) {
sources += [ "layers/fuchsia_layer_unittests.cc" ]
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#define _USE_MATH_DEFINES
#include "flutter/flow/matrix_decomposition.h"
#include <cmath>
......
......@@ -129,8 +129,15 @@ source_set("ui") {
"//third_party/skia",
]
if (!defined(defines)) {
defines = []
}
if (flutter_enable_skshaper) {
defines = [ "FLUTTER_ENABLE_SKSHAPER" ]
defines += [ "FLUTTER_ENABLE_SKSHAPER" ]
}
if (is_win) {
# Required for M_PI and others.
defines += [ "_USE_MATH_DEFINES" ]
}
if (is_fuchsia && flutter_enable_legacy_fuchsia_embedder) {
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#define _USE_MATH_DEFINES
#include "flutter/lib/ui/painting/canvas.h"
#include <cmath>
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#define _USE_MATH_DEFINES
#include "flutter/lib/ui/painting/gradient.h"
#include "third_party/tonic/converter/dart_converter.h"
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#define _USE_MATH_DEFINES
#include "flutter/lib/ui/painting/path.h"
#include <cmath>
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#define _USE_MATH_DEFINES
#include "flutter/lib/ui/painting/path_measure.h"
#include <cmath>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册