mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-18 17:07:37 -04:00
Support system Google Benchmark
This commit is contained in:
parent
126cf40848
commit
d85cbe4069
@ -1,3 +1,8 @@
|
|||||||
|
option(OPENMW_USE_SYSTEM_BENCHMARK "Use system Google Benchmark library." OFF)
|
||||||
|
|
||||||
|
if(OPENMW_USE_SYSTEM_BENCHMARK)
|
||||||
|
find_package(benchmark REQUIRED)
|
||||||
|
else()
|
||||||
cmake_minimum_required(VERSION 3.11)
|
cmake_minimum_required(VERSION 3.11)
|
||||||
|
|
||||||
set(BENCHMARK_ENABLE_TESTING OFF)
|
set(BENCHMARK_ENABLE_TESTING OFF)
|
||||||
@ -17,6 +22,7 @@ FetchContent_Declare(benchmark
|
|||||||
FetchContent_MakeAvailableExcludeFromAll(benchmark)
|
FetchContent_MakeAvailableExcludeFromAll(benchmark)
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS "${SAVED_CMAKE_CXX_FLAGS}")
|
set(CMAKE_CXX_FLAGS "${SAVED_CMAKE_CXX_FLAGS}")
|
||||||
|
endif()
|
||||||
|
|
||||||
openmw_add_executable(openmw_detournavigator_navmeshtilescache_benchmark detournavigator/navmeshtilescache.cpp)
|
openmw_add_executable(openmw_detournavigator_navmeshtilescache_benchmark detournavigator/navmeshtilescache.cpp)
|
||||||
target_compile_features(openmw_detournavigator_navmeshtilescache_benchmark PRIVATE cxx_std_17)
|
target_compile_features(openmw_detournavigator_navmeshtilescache_benchmark PRIVATE cxx_std_17)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user