24 #ifndef _BASIS_BASIS_BASIS_H 25 #define _BASIS_BASIS_BASIS_H 123 const char* version = NULL,
124 const char* project = NULL,
125 const char* copyright = NULL,
126 const char* license = NULL);
138 std::string
targetuid(
const std::string& name);
147 bool istarget(
const std::string& name);
174 std::string
exepath(
const std::string& name = std::string());
193 std::string
exename(
const std::string& name = std::string());
205 std::string
exedir(
const std::string& name = std::string());
241 int execute(
const std::string& cmd,
244 std::ostream* out = NULL,
245 bool allow_fail =
false,
247 bool simulate =
false);
276 int execute(std::vector<std::string> args,
279 std::ostream* out = NULL,
280 bool allow_fail =
false,
282 bool simulate =
false);
292 #endif // _BASIS_BASIS_BASIS_H std::string bindir()
Get absolute path to directory containing runtime executables.
std::string exename(const std::string &name=std::string())
Get name of executable file.
const unsigned int VERSION_MAJOR
The major version number.
std::string libexecdir()
Get absolute path to directory containing auxiliary executables.
Main module of project-independent BASIS utilities.
const char * LICENSE
Default license of executables.
std::string exedir(const std::string &name=std::string())
Get directory of executable file.
std::string targetuid(const std::string &name)
Get UID of build target.
int execute(const std::string &cmd, bool quiet=false, std::ostream *out=NULL, bool allow_fail=false, int verbose=0, bool simulate=false)
Execute command as subprocess.
bool istarget(const std::string &name)
Determine whether a given build target is known.
void print_version(const char *name, const char *version=NULL, const char *project=NULL, const char *copyright=NULL, const char *license=NULL)
Print version information including copyright and license notices.
const char * RELEASE
Complete version information as output by –version option.
std::string exepath(const std::string &name=std::string())
Get absolute path of executable file.
std::string libdir()
Get absolute path to directory containing libraries.
const char * CONTACT
Default contact to use for help output of executables.
MultiSwitchArg verbose("v", "verbose", "Increase verbosity of output messages.", false)
std::string datadir()
Get absolute path to directory containing auxiliary data.
const unsigned int VERSION_MINOR
The minor version number.
const unsigned int VERSION_PATCH
The patch number.
const char * COPYRIGHT
Default copyright of executables.
void print_contact(const char *contact=NULL)
Print contact information.
const char * VERSION
The version string given as "<major>.<minor>.<patch>".
const char * PROJECT
The project name.