本文整理汇总了C++中CompileJob::setCompilerPathname方法的典型用法代码示例。如果您正苦于以下问题:C++ CompileJob::setCompilerPathname方法的具体用法?C++ CompileJob::setCompilerPathname怎么用?C++ CompileJob::setCompilerPathname使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CompileJob
的用法示例。
在下文中一共展示了CompileJob::setCompilerPathname方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char **argv)
{
char *env = getenv("ICECC_DEBUG");
int debug_level = Error;
if (env) {
if (!strcasecmp(env, "info")) {
debug_level |= Info | Warning;
} else if (!strcasecmp(env, "warnings")) {
debug_level |= Warning; // taking out warning
} else { // any other value
debug_level |= Info | Debug | Warning;
}
}
std::string logfile;
if (const char *logfileEnv = getenv("ICECC_LOGFILE")) {
logfile = logfileEnv;
}
setup_debug(debug_level, logfile, "ICECC");
CompileJob job;
bool icerun = false;
string compiler_name = argv[0];
dcc_client_catch_signals();
char cwd[ PATH_MAX ];
if( getcwd( cwd, PATH_MAX ) != NULL )
job.setWorkingDirectory( cwd );
if (find_basename(compiler_name) == rs_program_name) {
if (argc > 1) {
string arg = argv[1];
if (arg == "--help") {
dcc_show_usage();
return 0;
}
if (arg == "--version") {
printf("ICECC " VERSION "\n");
return 0;
}
if (arg == "--build-native") {
return create_native(argv + 2);
}
if (arg.size() > 0) {
job.setCompilerName(arg);
job.setCompilerPathname(arg);
}
}
} else if (find_basename(compiler_name) == "icerun") {
icerun = true;
if (argc > 1) {
string arg = argv[1];
if (arg == "--help") {
icerun_show_usage();
return 0;
}
if (arg == "--version") {
printf("ICERUN " VERSION "\n");
return 0;
}
if (arg.size() > 0) {
job.setCompilerName(arg);
job.setCompilerPathname(arg);
}
}
} else {
std::string resolved;
// check if it's a symlink to icerun
if (resolve_link(compiler_name, resolved) == 0 && find_basename(resolved) == "icerun") {
icerun = true;
}
}
int sg_level = dcc_recursion_safeguard();
if (sg_level > 0) {
log_error() << "icecream seems to have invoked itself recursively!" << endl;
return EXIT_RECURSION;
}
/* Ignore SIGPIPE; we consistently check error codes and will
* see the EPIPE. */
dcc_ignore_sigpipe(1);
list<string> extrafiles;
local |= analyse_argv(argv, job, icerun, &extrafiles);
//.........这里部分代码省略.........