mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-18 18:15:44 +00:00
Mark the find_package(benchmark) with required
Add the REQUIRED flag to the find_package command to find the Google benchmark package. Without that flag, the find_package command will happily pass if the benchmarks are not found. However, if benchmarks is not found, then the CMake configure will then fail because the benchmark::benchmark library is not defined. That is a confusing error to get. Since benchmark is not a typical thing installed on a system, this can be problematic.
This commit is contained in:
parent
a5c686214b
commit
7e49c11313
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
# Find Google Benchmark. Note that benchmark_DIR must be pointed at an
|
# Find Google Benchmark. Note that benchmark_DIR must be pointed at an
|
||||||
# installation, not a build directory.
|
# installation, not a build directory.
|
||||||
find_package(benchmark)
|
find_package(benchmark REQUIRED)
|
||||||
|
|
||||||
function(add_benchmark)
|
function(add_benchmark)
|
||||||
set(options)
|
set(options)
|
||||||
|
Loading…
Reference in New Issue
Block a user