1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-03 17:37:18 +00:00
OpenMW/apps/benchmarks/settings/CMakeLists.txt
elsid 35f4bcd31e
Run openmw_settings_access_benchmark in CI
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.
2023-04-24 22:30:49 +02:00

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()