|
@@ -101,6 +101,7 @@ struct configuration
|
|
|
configuration parse_command_line(char **first, char **last)
|
|
configuration parse_command_line(char **first, char **last)
|
|
|
{
|
|
{
|
|
|
configuration cfg;
|
|
configuration cfg;
|
|
|
|
|
+ bool output_redirected = false;
|
|
|
for( ; first != last; ++first) {
|
|
for( ; first != last; ++first) {
|
|
|
std::string arg = *first;
|
|
std::string arg = *first;
|
|
|
if(arg == "--config") {
|
|
if(arg == "--config") {
|
|
@@ -111,6 +112,7 @@ configuration parse_command_line(char **first, char **last)
|
|
|
cfg.boostpath = *++first;
|
|
cfg.boostpath = *++first;
|
|
|
} else if(arg == "-o" || arg == "--output") {
|
|
} else if(arg == "-o" || arg == "--output") {
|
|
|
cfg.html_output = *++first;
|
|
cfg.html_output = *++first;
|
|
|
|
|
+ output_redirected = true;
|
|
|
} else if(arg == "--compiler") {
|
|
} else if(arg == "--compiler") {
|
|
|
cfg.compiler = *++first;
|
|
cfg.compiler = *++first;
|
|
|
} else if(arg.substr(0,1) == "-") {
|
|
} else if(arg.substr(0,1) == "-") {
|
|
@@ -132,6 +134,11 @@ configuration parse_command_line(char **first, char **last)
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ if(cfg.test != "" && !output_redirected) {
|
|
|
|
|
+ std::cerr << "Error: Please specify the HTML output file explicitly\n"
|
|
|
|
|
+ << "(using \"--output file\") when running a single test only.\n";
|
|
|
|
|
+ std::exit(1);
|
|
|
|
|
+ }
|
|
|
return cfg;
|
|
return cfg;
|
|
|
}
|
|
}
|
|
|
|
|
|