Skip to content
This repository has been archived by the owner on Feb 7, 2023. It is now read-only.

Commit

Permalink
cmake: NO_SYSTEM_ENVIRONMENT_PATH for benchmark
Browse files Browse the repository at this point in the history
In addition to other changes made to benchmark, this is helpful because
find_*() will still find files under the install prefix if PREFIX/bin is
in your path.
  • Loading branch information
lukeyeager committed Aug 29, 2017
1 parent a7a930a commit c101106
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions cmake/Modules/FindBenchmark.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,24 @@
# Benchmark_LIBRARIES - libraries needed to use benchmark

find_path(Benchmark_INCLUDE_DIR
NAMES benchmark/benchmark.h
DOC "The directory where benchmark includes reside"
NAMES benchmark/benchmark.h
NO_SYSTEM_ENVIRONMENT_PATH
DOC "The directory where benchmark includes reside"
)

find_library(Benchmark_LIBRARY
NAMES benchmark
DOC "The benchmark library"
NAMES benchmark
NO_SYSTEM_ENVIRONMENT_PATH
DOC "The benchmark library"
)

set(Benchmark_INCLUDE_DIRS ${Benchmark_INCLUDE_DIR})
set(Benchmark_LIBRARIES ${Benchmark_LIBRARY})

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Benchmark
FOUND_VAR Benchmark_FOUND
REQUIRED_VARS Benchmark_INCLUDE_DIR Benchmark_LIBRARY
FOUND_VAR Benchmark_FOUND
REQUIRED_VARS Benchmark_INCLUDE_DIR Benchmark_LIBRARY
)

mark_as_advanced(Benchmark_FOUND)

0 comments on commit c101106

Please sign in to comment.