Merging as much of PR #408 as we safely can.

PR 408's cmakelists.txt file has too many issues (OpenCL breaks on Windows/OSX) and changing our options to have the "BASISU_" prefix will break upstream builds.
This commit is contained in:
Richard Geldreich
2025-11-06 13:19:40 -05:00
parent b1110111d4
commit 196db8cbe2
11 changed files with 77 additions and 57 deletions

View File

@@ -107,20 +107,16 @@ namespace basisu
debug_puts(res.c_str());
}
#ifndef __EMSCRIPTEN__
#ifdef __GNUC__
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wclass-memaccess"
#endif
#endif
template <typename T> inline void clear_obj(T& obj) { memset((void *)&obj, 0, sizeof(obj)); }
#ifndef __EMSCRIPTEN__
#ifdef __GNUC__
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic pop
#endif
#endif
constexpr double cPiD = 3.14159265358979323846264338327950288;
constexpr float REALLY_SMALL_FLOAT_VAL = .000000125f;