-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathFindBoostNumericBindings.cmake
141 lines (128 loc) · 4.67 KB
/
FindBoostNumericBindings.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
##############################################################################
# @file FindBoostNumericBindings.cmake
# @brief Find Boost Numeric Bindings package.
#
# This module looks for an installation of the Boost Numeric Bindings package,
# a bindings library for Boost.Ublas
# (see http://mathema.tician.de/software/boost-numeric-bindings). Note that
# you will also need Boost.Ublas in order to use this headers-only library.
#
# @par Input variables:
# <table border="0">
# <tr>
# @tp @b BoostNumericBindings_DIR @endtp
# <td>The Boost Numeric Bindings package files are searched under the
# specified root directory. This variable can also be set as environment
# variable.</td>
# </tr>
# <tr>
# @tp @b BOOSTNUMERICBINDINGS_DIR @endtp
# <td>Alternative environment variable for @p BoostNumericBindings_DIR.</td>
# </tr>
# </table>
#
# @par Output variables:
# <table border="0">
# <tr>
# @tp @b BoostNumericBindings_FOUND @endtp
# <td>Whether the Boost Numeric Bindings package was found and the following
# CMake variables are valid.</td>
# </tr>
# <tr>
# @tp @b BoostNumericBindings_INCLUDE_DIR @endtp
# <td>Cached include directory/ies.</td>
# </tr>
# <tr>
# @tp @b BoostNumericBindings_INCLUDE_DIRS @endtp
# <td>Alias for @p BoostNumericBindings_INCLUDE_DIR (not cached).</td>
# </tr>
# <tr>
# @tp @b BoostNumericBindings_INCLUDES @endtp
# <td>Alias for @p BoostNumericBindings_INCLUDE_DIR (not cached).</td>
# </tr>
# </table>
#
# @ingroup CMakeFindModules
##############################################################################
#=============================================================================
# Copyright 2011-2012 University of Pennsylvania
# Copyright 2013-2016 Andreas Schuh <[email protected]>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
# ----------------------------------------------------------------------------
# initialize search
if (NOT BoostNumericBindings_DIR)
if (NOT "$ENV{BOOSTNUMERICBINDINGS_DIR}" STREQUAL "")
set (
BoostNumericBindings_DIR
"$ENV{BOOSTNUMERICBINDINGS_DIR}"
CACHE PATH
"Installation prefix of boost-numeric-bindings."
FORCE
)
else ()
set (
BoostNumericBindings_DIR
"$ENV{BoostNumericBindings_DIR}"
CACHE PATH
"Installation prefix of boost-numeric-bindings."
FORCE
)
endif ()
endif ()
# ----------------------------------------------------------------------------
# find paths/files
if (BoostNumericBindings_DIR)
find_path (
BoostNumericBindings_INCLUDE_DIR
NAMES boost/numeric/bindings/atlas/cblas.hpp
HINTS ${BoostNumericBindings_DIR}
PATH_SUFFIXES "include" "include/boost-numeric-bindings"
DOC "Root include directory of boost-numeric-bindings."
NO_DEFAULT_PATH
)
else ()
find_path (
BoostNumericBindings_INCLUDE_DIR
NAMES boost/numeric/bindings/atlas/cblas.hpp
HINTS ENV C_INCLUDE_PATH ENV CXX_INCLUDE_PATH
PATH_SUFFIXES boost-numeric-bindings
DOC "Root include directory of boost-numeric-bindings."
)
endif ()
mark_as_advanced (BoostNumericBindings_INCLUDE_DIR)
# ----------------------------------------------------------------------------
# aliases / backwards compatibility
if (BoostNumericBindings_INCLUDE_DIR)
set (BoostNumericBindings_INCLUDE_DIRS "${BoostNumericBindings_INCLUDE_DIR}")
set (BoostNumericBindings_INCLUDES "${BoostNumericBindings_INCLUDE_DIR}")
endif ()
# ----------------------------------------------------------------------------
# handle the QUIETLY and REQUIRED arguments and set *_FOUND to TRUE
# if all listed variables are found or TRUE
include (FindPackageHandleStandardArgs)
find_package_handle_standard_args (
BoostNumericBindings
REQUIRED_VARS
BoostNumericBindings_INCLUDE_DIR
)
set (BoostNumericBindings_FOUND ${BOOSTNUMERICBINDINGS_FOUND})
# ----------------------------------------------------------------------------
# set BoostNumericBindings_DIR
if (NOT BoostNumericBindings_DIR AND BoostNumericBindings_FOUND)
set (
BoostNumericBindings_DIR
"${BoostNumericBindings_INCLUDE_DIR}"
CACHE PATH
"Installation prefix for NiftiCLib."
FORCE
)
endif ()