diff --git a/cmake/filament-allow-clang-windows.patch b/cmake/filament-allow-clang-windows.patch index e4fb9417..83f192b5 100644 --- a/cmake/filament-allow-clang-windows.patch +++ b/cmake/filament-allow-clang-windows.patch @@ -1,7 +1,20 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index e5475ef5..4eb8a68b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt +@@ -11,12 +11,7 @@ cmake_minimum_required(VERSION 3.22.1) + # Unsupported environment + # ================================================================================================== + +-# Filament does not support MSYS2-based environment on Windows. See issue #9968. +-if(DEFINED ENV{MSYSTEM}) +- message(FATAL_ERROR +- "MSYS2 Subsystem detected($ENV{MSYSTEM}). " +- "Filament does not support MSYS2-based environment on Windows.") +-endif() ++ + + # ================================================================================================== + # Toolchain configuration @@ -247,57 +247,59 @@ if (WIN32) # __declspec(dllexport) in front of each functions). set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) @@ -492,17 +505,6 @@ diff --git a/filament/CMakeLists.txt b/filament/CMakeLists.txt + endif() endif() -diff --git a/filament/backend/CMakeLists.txt b/filament/backend/CMakeLists.txt ---- a/filament/backend/CMakeLists.txt -+++ b/filament/backend/CMakeLists.txt -@@ -525,3 +525,7 @@ - endif() - -+if (WIN32 AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang") -+ list(APPEND FILAMENT_WARNINGS -Wno-error=cast-function-type-mismatch -Wno-error=unused-variable -Wno-error=microsoft-unqualified-friend) -+endif() -+ - if (APPLE) diff --git a/libs/utils/include/utils/compiler.h b/libs/utils/include/utils/compiler.h --- a/libs/utils/include/utils/compiler.h @@ -517,3 +519,18 @@ diff --git a/libs/utils/include/utils/compiler.h b/libs/utils/include/utils/comp #else #define UTILS_THREAD_ANNOTATION_ATTRIBUTE(x) +diff --git a/filament/backend/CMakeLists.txt b/filament/backend/CMakeLists.txt +index 78c05dd22..b124685c4 100644 +--- a/filament/backend/CMakeLists.txt ++++ b/filament/backend/CMakeLists.txt +@@ -523,6 +523,9 @@ else() + -Wover-aligned -Wreorder-init-list + -Werror + ) ++ if (WIN32 AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang") ++ list(APPEND FILAMENT_WARNINGS -Wno-error=cast-function-type-mismatch -Wno-error=unused-variable -Wno-error=microsoft-unqualified-friend) ++ endif() + endif() + + if (APPLE) +