Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Added NOMINMAX and WIN32_LEAN_AND_MEAN defines before including windows.sh #763
So guarding the define like this
#if !defined(NOMINMAX) #define NOMINMAX #define CATCH_DEFINED_NOMINMAX #endif ... same for WIN32_LEAN_AND_MEAN #include <windows.h> #ifdef CATCH_DEFINED_NOMINMAX #undef NOMINMAX #endif
would be prefered? (Obviously at that point the logic would be factored out to
If we go this way, we could also provide a configuration option to stop Catch from including
That's one way to do it. I did wonder if it worked out easier to do the cross product of possibilities (so you don't need the intermediate identifiers) - but probably not - and certainly not scalable.
I rebased and changed the PR, but the results are not pretty.
To the best of my knowledge, only way to fix this would be to create a proxy header, that hides away the preprocessor directives.