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>_ROOTcache/environment variables. - paths in CMake-specific cache variables.
- paths in CMake-specific environment variables.
- paths in the
HINTSoption. - paths in standard system environment variables (PATH env).
- paths in CMake variables defined in Platform files.
- paths in the
PATHSoption.
However, what confuses me is:
-
Firstly, according to the description in the
find_programdocumentation, ifNO_DEFAULT_PATHis specified, thenfind_programwill not search any of the additional paths specified above.If
NO_DEFAULT_PATHis specified, then no additional paths are added to the search. IfNO_DEFAULT_PATHis not specified, the search process is as follows: -
However, from the content of the
FindOpenSSL.cmakeand the examples in thefind_programdocumentation, it seems thatNO_DEFAULT_PATHdoes not affect the additional paths specified in thePATHSandHINTSoptions.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_PATHinfind_xxxcommands?