mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Discover path.
This commit is contained in:
parent
f692cec11d
commit
09eeb1a6b9
@ -57,12 +57,30 @@ boost::filesystem::path testPath()
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
string EVMOneEnvOrDefaultPath()
|
std::string EVMOneEnvOrDefaultPath()
|
||||||
{
|
{
|
||||||
if (auto path = getenv("ETH_EVMONE"))
|
if (auto path = getenv("ETH_EVMONE"))
|
||||||
return path;
|
return path;
|
||||||
else
|
|
||||||
return "./libevmone.so";
|
auto const searchPath =
|
||||||
|
{
|
||||||
|
fs::path("/usr/local/lib"),
|
||||||
|
fs::path("/usr/lib"),
|
||||||
|
fs::current_path() / "deps",
|
||||||
|
fs::current_path() / "deps" / "lib",
|
||||||
|
fs::current_path() / ".." / "deps",
|
||||||
|
fs::current_path() / ".." / "deps" / "lib",
|
||||||
|
fs::current_path() / ".." / ".." / "deps",
|
||||||
|
fs::current_path() / ".." / ".." / "deps" / "lib",
|
||||||
|
fs::current_path()
|
||||||
|
};
|
||||||
|
for (auto const& basePath: searchPath)
|
||||||
|
{
|
||||||
|
fs::path p = basePath / "libevmone.so";
|
||||||
|
if (fs::exists(p))
|
||||||
|
return p.string();
|
||||||
|
}
|
||||||
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
CommonOptions::CommonOptions(std::string _caption):
|
CommonOptions::CommonOptions(std::string _caption):
|
||||||
|
Loading…
Reference in New Issue
Block a user