darksylinc / betsy

Betsy GPU compressor
Other
314 stars 18 forks source link

Build with C++11 when not using MSVC #11

Closed nanley closed 2 years ago

nanley commented 2 years ago

When using gcc 12.2.0, this converts build errors to warnings. For example, the error from this output:

   In file included from Dependencies/FreeImage/Source/FreeImage/../OpenEXR/IlmImf/ImfHeader.h:51,
                    from Dependencies/FreeImage/Source/FreeImage/../OpenEXR/IlmImf/ImfOutputFile.h:46,
                    from Dependencies/FreeImage/Source/FreeImage/PluginEXR.cpp:33:
   Dependencies/FreeImage/Source/OpenEXR/Imath/ImathVec.h:228:41: error: ISO C++17 does not allow dynamic exception specifications
     228 |     const Vec2 &        normalizeExc () throw (IEX_NAMESPACE::MathExc);
         |

becomes:

   warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
darksylinc commented 2 years ago

Thanks! Fixed using CMAKE_CXX_STANDARD in bffb320104de7f0d0d225de3bd96f7f9d4288e2f