Add benchmark target to CMake

This adds a benchmark target to CMake to run the new benchmarks.

example: ninja benchmark
This commit is contained in:
ridiculousfish 2019-04-10 14:30:31 -07:00
parent 2d4872ba60
commit c39950e49a
2 changed files with 8 additions and 0 deletions

View file

@ -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)

5
cmake/Benchmark.cmake Normal file
View file

@ -0,0 +1,5 @@
# Support for benchmarking fish.
ADD_CUSTOM_TARGET(benchmark
COMMAND ${CMAKE_SOURCE_DIR}/benchmarks/driver.sh $<TARGET_FILE:fish>
)