CMAKE_IGNORE_PREFIX_PATHΒΆ

Added in version 3.23.

Semicolon-separated list of search prefixes to be ignored by the find_program(), find_library(), find_file(), and find_path() commands. The prefixes are also ignored by the Config mode of the find_package() command (Module mode is unaffected). To ignore specific directories instead, see CMAKE_IGNORE_PATH.

Ignoring search locations can be useful in cross-compiling environments where some system directories contain incompatible but possibly linkable libraries. For example, on cross-compiled cluster environments, this allows a user to ignore directories containing libraries meant for the front-end machine.

By default, CMAKE_IGNORE_PREFIX_PATH is empty. It is intended to be set by the project or the end user.

See also the following variables: