mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-14 00:45:54 +08:00
Fix warnings about _USE_MATH_DEFINES on Windows
This commit is contained in:
parent
908b8db5dc
commit
1e17979e05
@ -78,9 +78,7 @@ if ($^O eq 'darwin') {
|
||||
}
|
||||
}
|
||||
if ($mswin) {
|
||||
# In case windows.h is included, we don't want the min / max macros to be active.
|
||||
# If <math.h> is included, we want the #defines to be active (M_PI etc.)
|
||||
push @cflags, qw(-DNOMINMAX -D_USE_MATH_DEFINES);
|
||||
push @cflags, qw(-DNOMINMAX);
|
||||
}
|
||||
|
||||
my @INC = qw(-Isrc/libslic3r);
|
||||
|
@ -1,7 +1,6 @@
|
||||
#include "../ClipperUtils.hpp"
|
||||
#include "../PolylineCollection.hpp"
|
||||
#include "../Surface.hpp"
|
||||
#define _USE_MATH_DEFINES
|
||||
#include <cmath>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
@ -4,7 +4,12 @@
|
||||
// this needs to be included early for MSVC (listing it in Build.PL is not enough)
|
||||
#include <ostream>
|
||||
#include <iostream>
|
||||
|
||||
// Otherwise #defines like M_PI are undeclared under Visual Studio
|
||||
#ifndef _USE_MATH_DEFINES
|
||||
#define _USE_MATH_DEFINES
|
||||
#endif
|
||||
|
||||
#include <math.h>
|
||||
#include <queue>
|
||||
#include <sstream>
|
||||
|
Loading…
x
Reference in New Issue
Block a user