NMEA: sentence ZFI added
[marnav.git] / cmake / ExternBenchmark.cmake
blob49614a2d8d8fabaf366161b073e24122f6d53881
1 message(STATUS "Extern: benchmark 1.2.0")
3 set(benchmark_INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/local")
4 set(benchmark_INCLUDE_DIR "${benchmark_INSTALL_DIR}/include")
5 set(benchmark_LIBRARY_DIR "${benchmark_INSTALL_DIR}/lib")
7 ExternalProject_Add(extern_benchmark
8         PREFIX "${CMAKE_CURRENT_BINARY_DIR}/benchmark"
9         SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/extern/benchmark-1.2.0"
10         # configure
11         CMAKE_ARGS
12                 -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
13                 -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
14                 -DCMAKE_INSTALL_PREFIX=${benchmark_INSTALL_DIR}
15                 -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
16         # install
17         INSTALL_DIR ${benchmark_INSTALL_DIR}
18         )
20 add_library(benchmark::benchmark STATIC IMPORTED)
21 set_target_properties(benchmark::benchmark
22         PROPERTIES
23                 IMPORTED_LOCATION
24                         ${benchmark_LIBRARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}benchmark${CMAKE_STATIC_LIBRARY_SUFFIX}
25                 INTERFACE_INCLUDE_DIRECTORIES
26                         ${benchmark_INCLUDE_DIR}
27         )
28 add_dependencies(benchmark::benchmark extern_benchmark)