]>
Commit | Line | Data |
---|---|---|
1d09f67e TL |
1 | # |
2 | # Licensed under the Apache License, Version 2.0 (the "License"); | |
3 | # you may not use this file except in compliance with the License. | |
4 | # You may obtain a copy of the License at | |
5 | # | |
6 | # http://www.apache.org/licenses/LICENSE-2.0 | |
7 | # | |
8 | # Unless required by applicable law or agreed to in writing, software | |
9 | # distributed under the License is distributed on an "AS IS" BASIS, | |
10 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
11 | # See the License for the specific language governing permissions and | |
12 | # limitations under the License. | |
13 | # | |
14 | # Tries to find the infer module | |
15 | # | |
16 | # Usage of this module as follows: | |
17 | # | |
18 | # find_package(InferTools) | |
19 | # | |
20 | # Variables used by this module, they can change the default behaviour and need | |
21 | # to be set before calling find_package: | |
22 | # | |
23 | # InferTools_PATH - | |
24 | # When set, this path is inspected instead of standard library binary locations | |
25 | # to find infer | |
26 | # | |
27 | # This module defines | |
28 | # INFER_BIN, The path to the infer binary | |
29 | # INFER_FOUND, Whether infer was found | |
30 | ||
31 | find_program(INFER_BIN | |
32 | NAMES infer | |
33 | PATHS ${InferTools_PATH} | |
34 | $ENV{INFER_TOOLS_PATH} | |
35 | /usr/local/bin | |
36 | /usr/bin | |
37 | /usr/local/homebrew/bin | |
38 | /opt/local/bin | |
39 | NO_DEFAULT_PATH) | |
40 | ||
41 | if("${INFER_BIN}" STREQUAL "INFER_BIN-NOTFOUND") | |
42 | set(INFER_FOUND 0) | |
43 | message(STATUS "infer not found") | |
44 | else() | |
45 | set(INFER_FOUND 1) | |
46 | message(STATUS "infer found at ${INFER_BIN}") | |
47 | endif() |