diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 5fd9900c..2b842203 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -48,7 +48,13 @@ function(spdlog_prepare_test test_target spdlog_lib) if(SPDLOG_SANITIZE_ADDRESS) spdlog_enable_sanitizer(${test_target}) endif() - add_test(NAME ${test_target} COMMAND ${test_target}) + add_test(NAME ${test_target} COMMAND ${test_target}) + + if (CMAKE_SYSTEM_NAME STREQUAL Linux) + if (CMAKE_SIZEOF_VOID_P EQUAL 4) + target_compile_definitions(${test_target} PRIVATE _FILE_OFFSET_BITS=64) + endif() + endif() endfunction() # The compiled library tests