-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathFindHighwayHash.cmake
42 lines (36 loc) · 1.54 KB
/
FindHighwayHash.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
################################################################################
#
# \file FindHighwayHash.cmake
# \copyright 2012-2015 J. Bakosi,
# 2016-2018 Los Alamos National Security, LLC.,
# 2019-2021 Triad National Security, LLC.
# All rights reserved. See the LICENSE file for details.
# \brief Find HighwayHash
#
################################################################################
# HighwayHash: https://github.com/google/highwayhash
#
# HighwayHash_FOUND - System has HighwayHash
# HIGHWAYHASH_INCLUDE_DIRS - The HighwayHash include directory
#
# Set the HIGHWAYHASH_ROOT cmake variable or shell environment variable before
# calling find_package to a path to add an additional search path, e.g.,
#
# Usage:
#
# set(HHIGHWAYHASH_ROOT "/path/to/custom/highwayhash") # prefer over system
# find_package(HighwayHash)
# include_directories(${HIGHWAYHASH_INCLUDE_DIRS})
# If already in cache, be silent
if(HIGHWAYHASH_INCLUDE_DIRS)
set (HIGHWAYHASH_FIND_QUIETLY TRUE)
endif()
find_path(HIGHWAYHASH_INCLUDE_DIR NAMES highwayhash/sip_hash.h
HINTS ${HIGHWAYHASH_ROOT}
$ENV{HIGHWAYHASH_ROOT})
set(HIGHWAYHASH_INCLUDE_DIRS ${HIGHWAYHASH_INCLUDE_DIR})
# Handle the QUIETLY and REQUIRED arguments and set HighwayHash_FOUND to TRUE if
# all listed variables are TRUE.
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(HighwayHash REQUIRED_VARS HIGHWAYHASH_INCLUDE_DIRS)
MARK_AS_ADVANCED(HIGHWAYHASH_INCLUDE_DIRS)