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"
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}
17 INSTALL_DIR ${benchmark_INSTALL_DIR}
20 add_library(benchmark::benchmark STATIC IMPORTED)
21 set_target_properties(benchmark::benchmark
24 ${benchmark_LIBRARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}benchmark${CMAKE_STATIC_LIBRARY_SUFFIX}
25 INTERFACE_INCLUDE_DIRECTORIES
26 ${benchmark_INCLUDE_DIR}
28 add_dependencies(benchmark::benchmark extern_benchmark)