1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2026-01-31 08:48:27 +00:00
openmw/apps/benchmarks/CMakeLists.txt
elsid 921a22fb73
Use target_precompile_headers for the most expensive headers
Only for MSVC. Ccache doesn't work out of the box with precompiled headers but
usually gives less build time for Clang and GCC. Also GCC builds code slower
with precompiled headers for unknown reason.
2022-07-01 13:02:13 +02:00

15 lines
694 B
CMake

if(OPENMW_USE_SYSTEM_BENCHMARK)
find_package(benchmark REQUIRED)
endif()
openmw_add_executable(openmw_detournavigator_navmeshtilescache_benchmark detournavigator/navmeshtilescache.cpp)
target_compile_features(openmw_detournavigator_navmeshtilescache_benchmark PRIVATE cxx_std_17)
target_link_libraries(openmw_detournavigator_navmeshtilescache_benchmark benchmark::benchmark components)
if (UNIX AND NOT APPLE)
target_link_libraries(openmw_detournavigator_navmeshtilescache_benchmark ${CMAKE_THREAD_LIBS_INIT})
endif()
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.16 AND MSVC)
target_precompile_headers(openmw_detournavigator_navmeshtilescache_benchmark PRIVATE <algorithm>)
endif()