From c39950e49a131f005f8ab8f6e43a6c3aba659d32 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Wed, 10 Apr 2019 14:30:31 -0700 Subject: [PATCH] Add benchmark target to CMake This adds a benchmark target to CMake to run the new benchmarks. example: ninja benchmark --- CMakeLists.txt | 3 +++ cmake/Benchmark.cmake | 5 +++++ 2 files changed, 8 insertions(+) create mode 100644 cmake/Benchmark.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index e56dd2ada..99c24f516 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -168,6 +168,9 @@ ADD_EXECUTABLE(fish_test_helper src/fish_test_helper.cpp) # Set up tests. INCLUDE(cmake/Tests.cmake) +# Benchmarking support. +INCLUDE(cmake/Benchmark.cmake) + # Set up install. INCLUDE(cmake/Install.cmake) diff --git a/cmake/Benchmark.cmake b/cmake/Benchmark.cmake new file mode 100644 index 000000000..8eab311ce --- /dev/null +++ b/cmake/Benchmark.cmake @@ -0,0 +1,5 @@ +# Support for benchmarking fish. + +ADD_CUSTOM_TARGET(benchmark + COMMAND ${CMAKE_SOURCE_DIR}/benchmarks/driver.sh $ +)