1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2024-12-29 03:19:44 +00:00
OpenMW/apps/benchmarks/settings/CMakeLists.txt
elsid 5859fd464c
Add option to disable precompiled headers
To be able to use ccache.

Also fix compilation errors appeared due to absence of precompiled
headers.
2024-03-08 02:11:51 +01:00

19 lines
720 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 (MSVC AND PRECOMPILE_HEADERS_WITH_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()