Repository: mesos Updated Branches: refs/heads/master 8cf6b0882 -> eb901173b
Added libprocess benchmarks to cmake build setup. To make sure that `benchmarks` is built as part of the tests we add a dependency of `libprocess-tests` on `benchmarks` even though no actual compile- or runtime dependency exists. Review: https://reviews.apache.org/r/65166/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/eb901173 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/eb901173 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/eb901173 Branch: refs/heads/master Commit: eb901173b8aa43b9fd1ab0f727ff5187982c4449 Parents: 8cf6b08 Author: Benjamin Bannier <benjamin.bann...@mesosphere.io> Authored: Thu Jan 18 11:36:44 2018 +0100 Committer: Benjamin Bannier <bbann...@apache.org> Committed: Thu Jan 18 11:36:44 2018 +0100 ---------------------------------------------------------------------- 3rdparty/libprocess/src/tests/CMakeLists.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/eb901173/3rdparty/libprocess/src/tests/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/3rdparty/libprocess/src/tests/CMakeLists.txt b/3rdparty/libprocess/src/tests/CMakeLists.txt index 8b76cab..d624402 100644 --- a/3rdparty/libprocess/src/tests/CMakeLists.txt +++ b/3rdparty/libprocess/src/tests/CMakeLists.txt @@ -77,3 +77,25 @@ if (ENABLE_SSL) endif () add_test(NAME ProcessTests COMMAND libprocess-tests) + +# LIBPROCESS BENCHMARK TESTS. +############################# +add_custom_command( + OUTPUT benchmarks.pb.h benchmarks.pb.cc + COMMAND protoc + -I${CMAKE_CURRENT_SOURCE_DIR} + --cpp_out=${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/benchmarks.proto + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/benchmarks.proto) + +add_executable(benchmarks + EXCLUDE_FROM_ALL + benchmarks.cpp + benchmarks.pb.cc) +target_link_libraries(benchmarks PRIVATE process-interface) +target_include_directories(benchmarks PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) + +# Add dependency of `libprocess-tests` on `benchmarks`. This is done +# to make sure that `benchmarks` is built as part of the `tests` +# target; there is no actual compile or runtime dependency. +add_dependencies(libprocess-tests benchmarks)