Change the strerror_override handling to check $_JSON_C_STRERROR_OVERRIDE instead of using a variable, so we don't need to export it.

This commit is contained in:
Eric Haszlakiewicz
2020-07-04 18:56:15 +00:00
parent b01d50b8dc
commit 6068d3f6d1
5 changed files with 11 additions and 7 deletions

View File

@@ -37,6 +37,10 @@ foreach(TESTNAME
test_object_iterator)
add_executable(${TESTNAME} ${TESTNAME}.c)
if(${TESTNAME} STREQUAL test_util_file)
# For output consistency, we need _json_c_strerror() in some tests:
target_sources(${TESTNAME} PRIVATE ../strerror_override.c)
endif()
add_test(NAME ${TESTNAME} COMMAND ${PROJECT_SOURCE_DIR}/tests/${TESTNAME}.test)
# XXX using the non-target_ versions of these doesn't work :(