Skip to content

Commit

Permalink
[build] Warning Suppression PR #3: Eliminate warnings from third-part…
Browse files Browse the repository at this point in the history
…y headers (#4920)

* [build] Warning Suppression PR #1: Turned on -Wno-ignored-attributes & Removed unused functions

* [build] Warning Suppression PR #2: Eliminate warnings from third-party headers

* Fixed an warning with enum comparison
  • Loading branch information
jim19930609 authored May 7, 2022
1 parent 72a1517 commit 7324903
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion cmake/TaichiCore.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,9 @@ if (TI_WITH_VULKAN)

target_include_directories(${CORE_LIBRARY_NAME} PRIVATE external/SPIRV-Headers/include)
target_include_directories(${CORE_LIBRARY_NAME} PRIVATE external/SPIRV-Reflect)
target_include_directories(${CORE_LIBRARY_NAME} PRIVATE external/VulkanMemoryAllocator/include)

# By specifying SYSTEM, we suppressed the warnings from third-party headers.
target_include_directories(${CORE_LIBRARY_NAME} SYSTEM PRIVATE external/VulkanMemoryAllocator/include)

if (LINUX)
# shaderc requires pthread
Expand Down
2 changes: 1 addition & 1 deletion taichi/backends/vulkan/vulkan_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ void VulkanPipeline::create_descriptor_set_layout(const Params &params) {

for (auto var : variables) {
// We want to remove auxiliary outputs such as frag depth
if (var->built_in == -1) {
if (static_cast<int>(var->built_in) == -1) {
render_target_count++;
}
}
Expand Down

0 comments on commit 7324903

Please sign in to comment.