Check _MSC_VER for MSVC specific pragma directives.

This fixes build issues when compiled with compiles like Clang or GCC.
This commit is contained in:
Biswapriyo Nath
2020-12-02 02:05:14 +05:30
parent 0458ead7a2
commit 8d8ba521e2
10 changed files with 49 additions and 19 deletions

View File

@@ -18,10 +18,16 @@
#include <GL/gl.h>
#include <GL/glu.h>
#ifdef _MSC_VER
#pragma warning(disable: 4100) // Disable warning 'unreferenced formal parameter'
#endif // _MSC_VER
#define STB_IMAGE_IMPLEMENTATION
#include "contrib/stb_image/stb_image.h"
#ifdef _MSC_VER
#pragma warning(default: 4100) // Enable warning 'unreferenced formal parameter'
#endif // _MSC_VER
#include <fstream>