From 1446be57a4dc6eb6779edca6b901f83c07dc56ed Mon Sep 17 00:00:00 2001 From: Matt Woodward Date: Wed, 11 Sep 2019 10:56:35 +1000 Subject: [PATCH] Create FindBenchmark package --- FindBenchmark.cmake | 9 +++++++++ SwiftCmakeOptions.cmake | 2 ++ 2 files changed, 11 insertions(+) create mode 100644 FindBenchmark.cmake diff --git a/FindBenchmark.cmake b/FindBenchmark.cmake new file mode 100644 index 0000000..0ea4369 --- /dev/null +++ b/FindBenchmark.cmake @@ -0,0 +1,9 @@ +include("GenericFindDependency") +option(BENCHMARK_ENABLE_TESTING "" OFF) +option(BENCHMARK_ENABLE_INSTALL "" OFF) +option(BENCHMARK_ENABLE_GTEST_TESTS "" OFF) +option(BENCHMARK_ENABLE_EXCEPTIONS "" OFF) +GenericFindDependency( + TARGET benchmark + SYSTEM_INCLUDES + ) diff --git a/SwiftCmakeOptions.cmake b/SwiftCmakeOptions.cmake index 17af973..06bf45b 100644 --- a/SwiftCmakeOptions.cmake +++ b/SwiftCmakeOptions.cmake @@ -137,6 +137,8 @@ function(verify_test_dependencies) set(found TRUE) elseif(${P} STREQUAL "FastCSV" AND TARGET fast-csv) set(found TRUE) + elseif(${P} STREQUAL "Benchmark" AND TARGET benchmark) + set(found TRUE) endif() if(NOT found) message(STATUS "Disable tests because dependency ${P} was not found")