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