Fix compiler warnings on macOS

This commit is contained in:
2026-04-05 13:02:01 +02:00
parent 4e6fde17ea
commit 1d214b20e4
3 changed files with 12 additions and 4 deletions
Binary file not shown.
+5
View File
@@ -58,6 +58,11 @@ extern "C" typedef HRESULT (WINAPI *t_GetThreadDescription)( HANDLE, PWSTR* );
#endif
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#endif
namespace tracy
{
@@ -66,6 +66,9 @@ namespace Flax.Deps.Dependencies
var commit = "aeece2f609db959d1c5e43e4f00bd177ea130575"; // 4.6.1
CloneGitRepo(root, "https://github.com/ARM-software/astc-encoder.git", commit);
// Fix compilation on macOS
Utilities.ReplaceInFile(Path.Combine(root, "Source/cmake_core.cmake"), "-ffp-model=precise", "");
foreach (var platform in options.Platforms)
{
foreach (var architecture in options.Architectures)
@@ -91,7 +94,7 @@ namespace Flax.Deps.Dependencies
var isa = architecture == TargetArchitecture.ARM64 ? "-DASTCENC_ISA_NEON=ON" : "-DASTCENC_ISA_SSE2=ON";
var lib = architecture == TargetArchitecture.ARM64 ? "libastcenc-neon-static.a" : "libastcenc-sse2-static.a";
SetupDirectory(buildDir, true);
RunCmake(buildDir, platform, architecture, ".. -DCMAKE_BUILD_TYPE=Release -DASTCENC_UNIVERSAL_BUILD=OFF -DASTCENC_UNIVERSAL_BINARY=OFF " + isa);
RunCmake(buildDir, platform, architecture, ".. -DCMAKE_BUILD_TYPE=Release -DASTCENC_UNIVERSAL_BUILD=OFF -DASTCENC_UNIVERSAL_BINARY=OFF -DASTCENC_INVARIANCE=OFF " + isa);
BuildCmake(buildDir);
var depsFolder = GetThirdPartyFolder(options, platform, architecture);
Utilities.FileCopy(Path.Combine(buildDir, "Source", lib), Path.Combine(depsFolder, "libastcenc.a"));