diff --git a/include/mitsuba/core/platform.h b/include/mitsuba/core/platform.h index 382d3d53..24a128a1 100644 --- a/include/mitsuba/core/platform.h +++ b/include/mitsuba/core/platform.h @@ -52,6 +52,17 @@ #include #pragma intrinsic(memset, memcmp, memcpy, strlen, strcmp, strcpy, _strset, strcat, fabs, abs) #endif + + #if _MSC_VER >= 1600 + #ifdef SINGLE_PRECISION + #pragma detect_mismatch( "MTS_FLOAT_PRECISION", "SINGLE") + #elif DOUBLE_PRECISION + #pragma detect_mismatch( "MTS_FLOAT_PRECISION", "DOUBLE") + #endif + #define MTS_STRINGIFY(s) #s + #define MTS_XSTRINGIFY(s) MTS_STRINGIFY(s) + #pragma detect_mismatch("MTS_SPECTRUM_SAMPLES", MTS_XSTRINGIFY(SPECTRUM_SAMPLES)) + #endif #elif defined(__APPLE__) #define __OSX__ #elif defined(__linux)