Define _USE_MATH_DEFINES on Windows where needed (flutter/engine#21166)
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user