foundationdb/flowbench/CMakeLists.txt

53 lines
1.5 KiB
CMake
Raw Normal View History

2020-08-04 06:10:31 +08:00
set(FLOWBENCH_SRCS
flowbench.actor.cpp
BenchHash.cpp
2020-07-27 05:26:23 +08:00
BenchIterate.cpp
BenchMem.cpp
BenchMetadataCheck.cpp
2020-07-27 05:26:23 +08:00
BenchPopulate.cpp
2020-08-04 06:29:21 +08:00
BenchRandom.cpp
2020-08-02 04:25:47 +08:00
BenchRef.cpp
BenchStream.actor.cpp
2020-08-04 06:29:40 +08:00
BenchTimer.cpp
GlobalData.h
GlobalData.cpp)
2021-01-26 05:44:55 +08:00
if(WITH_TLS AND NOT WIN32)
set(FLOWBENCH_SRCS
${FLOWBENCH_SRCS}
BenchEncrypt.cpp)
endif()
2020-08-04 06:10:31 +08:00
project (flowbench)
# include the configurations from benchmark.cmake
configure_file(benchmark.cmake googlebenchmark-download/CMakeLists.txt)
# executing the configuration step
execute_process(
COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" .
RESULT_VARIABLE results
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googlebenchmark-download
)
# checking if the configuration step passed
if(results)
message(FATAL_ERROR "Configuration step for Benchmark has Failed. ${results}")
endif()
# executing the build step
execute_process(
COMMAND ${CMAKE_COMMAND} --build . --config Release
RESULT_VARIABLE results
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googlebenchmark-download
)
# checking if the build step passed
if(results)
message(FATAL_ERROR "Build step for Benchmark has Failed. ${results}")
endif()
2020-10-22 06:45:51 +08:00
set(BENCHMARK_ENABLE_TESTING OFF)
add_subdirectory(
${CMAKE_CURRENT_BINARY_DIR}/googlebenchmark-src
${CMAKE_CURRENT_BINARY_DIR}/googlebenchmark-build
EXCLUDE_FROM_ALL
)
include_directories(${CMAKE_CURRENT_BINARY_DIR}/googlebenchmark-src/include)
2020-08-04 06:10:31 +08:00
add_flow_target(EXECUTABLE NAME flowbench SRCS ${FLOWBENCH_SRCS})
target_link_libraries(flowbench benchmark pthread flow fdbclient)