P4C
The P4 Compiler
Loading...
Searching...
No Matches
exename.h
1/*
2 * SPDX-FileCopyrightText: 2020 Barefoot Networks, Inc.
3 * Copyright 2020-present Barefoot Networks, Inc.
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 */
7#ifndef LIB_EXENAME_H_
8#define LIB_EXENAME_H_
9
10#include <filesystem>
11
12namespace P4 {
13
17std::filesystem::path getExecutablePath(const std::filesystem::path &suggestedPath);
18
22std::filesystem::path getExecutablePath();
23
26[[deprecated("Use getExecutablePath() instead")]]
27const char *exename(const char *argv0 = nullptr);
28
29} // namespace P4
30
31#endif /* LIB_EXENAME_H_ */
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:13
const char * exename(const char *argv0)
Definition exename.cpp:76
std::filesystem::path getExecutablePath()
Definition exename.cpp:26