mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-03 17:37:18 +00:00
35f4bcd31e
Add benchmarks to access 2 and 3 settings. Use settings with max memory address distance assuming Settings::Values is single memory location object. Use settings-default.cfg from the source code repository to initialize settings.
19 lines
732 B
CMake
19 lines
732 B
CMake
openmw_add_executable(openmw_settings_access_benchmark access.cpp)
|
|
target_link_libraries(openmw_settings_access_benchmark benchmark::benchmark components)
|
|
|
|
target_compile_definitions(openmw_settings_access_benchmark
|
|
PRIVATE OPENMW_PROJECT_SOURCE_DIR=u8"${PROJECT_SOURCE_DIR}")
|
|
|
|
if (UNIX AND NOT APPLE)
|
|
target_link_libraries(openmw_settings_access_benchmark ${CMAKE_THREAD_LIBS_INIT})
|
|
endif()
|
|
|
|
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.16 AND MSVC)
|
|
target_precompile_headers(openmw_settings_access_benchmark PRIVATE <algorithm>)
|
|
endif()
|
|
|
|
if (BUILD_WITH_CODE_COVERAGE)
|
|
target_compile_options(openmw_settings_access_benchmark PRIVATE --coverage)
|
|
target_link_libraries(openmw_settings_access_benchmark gcov)
|
|
endif()
|