Skip to content

Commit 3933348

Browse files
MAS-OUDpaulromano
andauthored
Adding '#define _USE_MATH_DEFINES' to make M_PI declared in Intel and MSVC compilers (#3238)
Co-authored-by: Paul Romano <[email protected]>
1 parent 3a001d3 commit 3933348

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/external/quartic_solver.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include <algorithm>
2+
#define _USE_MATH_DEFINES // to make M_PI declared in Intel and MSVC compilers
23
#include <cmath>
34
#include <complex>
45
#include <cstdlib>

src/mesh.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#include "openmc/mesh.h"
2-
#include <algorithm> // for copy, equal, min, min_element
3-
#include <cmath> // for ceil
4-
#include <cstddef> // for size_t
2+
#include <algorithm> // for copy, equal, min, min_element
3+
#define _USE_MATH_DEFINES // to make M_PI declared in Intel and MSVC compilers
4+
#include <cmath> // for ceil
5+
#include <cstddef> // for size_t
56
#include <gsl/gsl-lite.hpp>
67
#include <string>
78

src/plot.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#include "openmc/plot.h"
22

33
#include <algorithm>
4+
#define _USE_MATH_DEFINES // to make M_PI declared in Intel and MSVC compilers
5+
#include <cmath>
46
#include <cstdio>
57
#include <fstream>
68
#include <sstream>

0 commit comments

Comments
 (0)