// -*- c++ -*- // Distributed under the BSD 2-Clause License. // See accompanying file LICENSE for details. #pragma once #include #include #include struct Settings; //! Locate file (needle) in the provided search path list (haystack) //! The provided settings is used to control verbosity during the search. //! \returns a std::filesystem::path pointing to path in which file was found //! - empty if not found. std::filesystem::path findFile(const Settings& settings, const std::string& needle, const std::vector& haystack); //! Locate header (needle) in the provided search path list (haystack) //! The provided settings is used to control verbosity during the search as well //! as providing the search paths defaults for headers. //! The argument provided haystack is prepended to the one supplied by settings. //! \returns a std::filesystem::path pointing to path where the file was found //! - empty if not found. std::filesystem::path findHeader(const Settings& settings, const std::string& needle, const std::vector& haystack); std::vector findBasename(const Settings& settings, const std::string& needle, const std::vector& haystack); std::vector findLibrary(const Settings& settings, const std::string& needle, const std::vector& haystack);