File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 1616// possible using these macros. Please also be sure to push/pop with the pybind11 macros. Please
1717// only use compiler specifics if you need to check specific versions, e.g. Apple Clang vs. vanilla
1818// Clang.
19- #if defined(_MSC_VER)
20- # define PYBIND11_COMPILER_MSVC
21- # define PYBIND11_PRAGMA (...) __pragma(__VA_ARGS__)
22- # define PYBIND11_WARNING_PUSH PYBIND11_PRAGMA (warning(push))
23- # define PYBIND11_WARNING_POP PYBIND11_PRAGMA (warning(pop))
24- #elif defined(__INTEL_COMPILER)
19+ #if defined(__INTEL_COMPILER)
2520# define PYBIND11_COMPILER_INTEL
2621# define PYBIND11_PRAGMA (...) _Pragma (#__VA_ARGS__)
2722# define PYBIND11_WARNING_PUSH PYBIND11_PRAGMA (warning push)
3631# define PYBIND11_PRAGMA (...) _Pragma (#__VA_ARGS__)
3732# define PYBIND11_WARNING_PUSH PYBIND11_PRAGMA (GCC diagnostic push)
3833# define PYBIND11_WARNING_POP PYBIND11_PRAGMA (GCC diagnostic pop)
34+ #elif defined(_MSC_VER) // Must be after the clang branch because clang-cl also defines _MSC_VER
35+ # define PYBIND11_COMPILER_MSVC
36+ # define PYBIND11_PRAGMA (...) __pragma(__VA_ARGS__)
37+ # define PYBIND11_WARNING_PUSH PYBIND11_PRAGMA (warning(push))
38+ # define PYBIND11_WARNING_POP PYBIND11_PRAGMA (warning(pop))
3939#endif
4040
4141#ifdef PYBIND11_COMPILER_MSVC
You can’t perform that action at this time.
0 commit comments