CMake find_library always called twice with and without NO_DEFAULT_PATH
In several find modules of dune, the commands find_library
, find_path
, and find_program
are called twice:
- with option
NO_DEFAULT_PATH
that enabled all NO_* options, i.e., only search inHINTS
andPATHS
that are specified in the find_xxx commands. - without the option
NO_DEFAULT_PATH
This is a non-standard behaviour and essential means that the paths fixed in the commands are always preferred. Is there any reason for this, that I do not see? Or is it historical, because the behaviour in cmake changed?