mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-29 22:02:00 +00:00
Make the Parser independent from the global C-locale (#5028)
* Make the Parser independent from the global C-locale * Set a specific test locale using the environment variable FLATBUFFERS_TEST_LOCALE * Remove redundant static qualifiers
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
d6b1ce09cf
commit
5f32f94810
@@ -81,17 +81,6 @@ target_compile_definitions(flatbuffers PRIVATE FLATBUFFERS_MAX_PARSING_DEPTH=8)
|
||||
|
||||
# Setup fuzzer tests.
|
||||
|
||||
# Change default ASCII locale (affects to isalpha, isalnum, decimal
|
||||
# delimiters, other). https://en.cppreference.com/w/cpp/locale/setlocale
|
||||
if(DEFINED FUZZ_TEST_LOCALE)
|
||||
# Enable locale independent code and define locale for tests.
|
||||
# -DFUZZ_TEST_LOCALE="" - enable, but test with default locale
|
||||
# -DFUZZ_TEST_LOCALE="ru_RU.CP1251" - enable and test with ru_RU.CP1251
|
||||
# Locale was installed before (Ubuntu):>sudo locale-gen ru_RU.CP1251
|
||||
add_definitions(-DFUZZ_TEST_LOCALE=\"${FUZZ_TEST_LOCALE}\")
|
||||
endif()
|
||||
message(STATUS "FUZZ_TEST_LOCALE: ${FUZZ_TEST_LOCALE}")
|
||||
|
||||
add_executable(scalar_fuzzer flatbuffers_scalar_fuzzer.cc)
|
||||
target_link_libraries(scalar_fuzzer PRIVATE flatbuffers)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user