Hello, CMake Team.
From the content of the CMake documentation, it is known:
For the find_xxx
family of commands, the search is generally conducted in the following order:
- paths in
<PackageName>_ROOT
cache/environment variables. - paths in CMake-specific cache variables.
- paths in CMake-specific environment variables.
- paths in the
HINTS
option. - paths in standard system environment variables (PATH env).
- paths in CMake variables defined in Platform files.
- paths in the
PATHS
option.
However, what confuses me is:
-
Firstly, according to the description in the
find_program
documentation, ifNO_DEFAULT_PATH
is specified, thenfind_program
will not search any of the additional paths specified above.If
NO_DEFAULT_PATH
is specified, then no additional paths are added to the search. IfNO_DEFAULT_PATH
is not specified, the search process is as follows: -
However, from the content of the
FindOpenSSL.cmake
and the examples in thefind_program
documentation, it seems thatNO_DEFAULT_PATH
does not affect the additional paths specified in thePATHS
andHINTS
options.find_program (<VAR> NAMES name PATHS paths... NO_DEFAULT_PATH) find_program (<VAR> NAMES name)
Therefore, I would like to confirm:
Which search paths are disabled by specifying
NO_DEFAULT_PATH
infind_xxx
commands?