CMakePackageFinderCache.h
Go to the documentation of this file.
1#pragma once
2
3#include <map>
4#include <mutex>
5
6#include <IceUtil/Time.h>
7
9
10namespace armarx
11{
13
15 {
16 public:
18 CMakePackageFinderCache(IceUtil::Time timeout = IceUtil::Time::seconds(10));
19 const CMakePackageFinder& findPackage(const std::string& packageName,
20 const std::filesystem::path& packagePath = "",
21 bool suppressStdErr = false,
22 bool usePackagePathOnlyAsHint = false);
24
25 private:
26 std::mutex mutex;
27 std::map<std::string, std::pair<IceUtil::Time, CMakePackageFinder>> packageFinders;
28 IceUtil::Time timeout;
29 };
30
31} // namespace armarx
const CMakePackageFinder & findPackage(const std::string &packageName, const std::filesystem::path &packagePath="", bool suppressStdErr=false, bool usePackagePathOnlyAsHint=false)
static CMakePackageFinderCache GlobalCache
CMakePackageFinderCache(const CMakePackageFinderCache &s)
The CMakePackageFinder class provides an interface to the CMake Package finder capabilities.
This file offers overloads of toIce() and fromIce() functions for STL container types.