Disable optimizations for gltf_decoder.cc in MSVC builds. (#829)

Not really sure who is to blame, but in optimized builds from MSVC
gltf_decoder.cc appears to be getting garbage values back
from TinyGLTF when it parses the materials for
testdata/.../three_meshes_two_materials_one_no_material.gltf

Since there's no certainty about whether this is limited to this
particular file, just disable optimizations for
src/draco/io/gltf_decoder.cc in all MSVC build configurations.
This commit is contained in:
Tom Finegan 2022-03-10 17:51:38 -08:00 committed by GitHub
parent 34c693fe78
commit 7d62f1f26f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 10 deletions

View File

@ -165,11 +165,7 @@ jobs:
-DDRACO_TESTS=ON \
-DDRACO_TRANSCODER_SUPPORTED=ON
cmake_build_command: cmake --build . --config Release -- -m:2
# TODO(https://github.com/google/draco/issues/826)
draco_test_command: |-
Release/draco_tests \
--gtest_filter=-GltfDecoderTest.ThreeMeshesOneNoMaterialMesh
draco_test_command: Release/draco_tests
- test_name: windows-msvc-release-static
os: windows-2019
@ -189,11 +185,7 @@ jobs:
-DDRACO_TESTS=ON \
-DDRACO_TRANSCODER_SUPPORTED=ON
cmake_build_command: cmake --build . --config Release -- -m:2
# TODO(https://github.com/google/draco/issues/826)
draco_test_command: |-
Release/draco_tests \
--gtest_filter=-GltfDecoderTest.ThreeMeshesOneNoMaterialMesh
draco_test_command: Release/draco_tests
- test_name: windows-make-release-shared
os: windows-2019

View File

@ -862,6 +862,13 @@ else()
${draco_include_paths})
if(DRACO_TRANSCODER_SUPPORTED)
if(MSVC)
# TODO(https://github.com/google/draco/issues/826)
set_source_files_properties(
"${draco_src_root}/io/gltf_decoder.cc"
PROPERTIES COMPILE_OPTIONS "/Od")
endif()
draco_add_library(
NAME
draco_material