matus-chochlik / oglplu2

Wrapper for OpenGL, OpenAL and EGL including utilities for writing distributed applications with graphics and/or audio rendering.
Boost Software License 1.0
89 stars 11 forks source link

Fixes build on OS X with Clang #5

Closed deranen closed 8 years ago

deranen commented 8 years ago
matus-chochlik commented 8 years ago

Thanks, merged with some minor changes. Could you check if it works?

Also would it be possible to isolate the external headers where the -Wno-deprecated-declarations and -Wno-missing-noreturn are needed and put:

#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wno-deprecated-declarations"
#pragma clang diagnostic ignored "-Wno-missing-noreturn"
#endif

#include ...

#ifdef __clang__
#pragma clang diagnostic pop
#endif

If there are two many and it would require changes to too many oglplu2 headers, then is there some reliable way of detecting El Capitan (or does it apply also to older versions of OS X) in CMake? I'd like to silence such warnings only on platforms where it is really necessary.