Cleanup: suppress template-id-cdtor GCC warnings
Ignoring from CMake didn't suppress the warnings from GPU sources that include this header. Suppress the warning using a pragma instead.
This commit is contained in:
@@ -388,11 +388,6 @@ endif()
|
||||
|
||||
|
||||
if(WITH_VULKAN_BACKEND)
|
||||
if(CMAKE_COMPILER_IS_GNUCC)
|
||||
# Suppress CPP20 compiler warnings in GCC14+
|
||||
set_source_files_properties(${VULKAN_SRC} PROPERTIES COMPILE_FLAGS "-Wno-template-id-cdtor")
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
list(APPEND INC_SYS
|
||||
${MOLTENVK_INCLUDE_DIRS}
|
||||
|
||||
@@ -17,6 +17,11 @@ namespace blender::gpu {
|
||||
class VKContext;
|
||||
class VKCommandBuffers;
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
/* CPP20 compiler warnings in GCC14+.
|
||||
* Must be resolved before upgrading to a newer C++, avoid noisy warnings for now. */
|
||||
#pragma GCC diagnostic ignored "-Wtemplate-id-cdtor"
|
||||
|
||||
/**
|
||||
* In vulkan multiple commands can be in flight simultaneously.
|
||||
*
|
||||
@@ -183,4 +188,6 @@ template<typename Resource> class VKResourceTracker : NonCopyable {
|
||||
}
|
||||
};
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
} // namespace blender::gpu
|
||||
|
||||
Reference in New Issue
Block a user