Skip to content

Commit c7f97f7

Browse files
committed
Global fix for g++ false positive
1 parent 47e98bb commit c7f97f7

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tests/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ if(SGL_BUILD_TESTS)
3737
sgl/math/test_quaternion.cpp
3838
sgl/math/test_vector.cpp
3939
)
40+
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
41+
# GCC/libstdc++ can emit a false positive for vector-key comparisons in this stress test.
42+
set_source_files_properties(sgl/core/test_lmdb_cache.cpp PROPERTIES COMPILE_OPTIONS "-Wno-error=stringop-overread")
43+
endif()
4044
target_include_directories(sgl_tests BEFORE PRIVATE sgl)
4145
target_link_libraries(sgl_tests PRIVATE sgl header_only)
4246
target_compile_definitions(sgl_tests PRIVATE SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")

0 commit comments

Comments
 (0)