Skip to content
Snippets Groups Projects
Commit a6c292cc authored by Axel Naumann's avatar Axel Naumann
Browse files

Also filter --gcc-toolchain; unify filtering of args. Typo.

parent d0504de7
No related branches found
No related tags found
No related merge requests found
......@@ -3614,6 +3614,21 @@ bool IsImplementationName(const std::string &filename)
return !IsHeaderName(filename);
}
//______________________________________________________________________________
int ShouldIgnoreClingArgument(const std::string& argument)
{
// Returns >0 if argument is to be ignored.
// If 1, just skip that argument. If 2, that argument takes a parameter
// "-arg param" thus skip both.
if (argument == "-pipe") return 1;
if (argument == "-fPIC") return 1;
if (argument == "-fpic") return 1;
if (ROOT::TMetaUtils::BeginsWith(argument, "--gcc-toolchain="))
return 1;
return 0;
}
//______________________________________________________________________________
bool IsCorrectClingArgument(const std::string& argument)
{
......@@ -3976,10 +3991,12 @@ int RootCling(int argc,
continue;
}
if (strcmp("-pipe", argv[ic]) != 0 && strcmp("-pthread", argv[ic]) != 0) {
// filter out undesirable options
if (strcmp("-fPIC", argv[ic]) && strcmp("-fpic", argv[ic])
&& strcmp("-p", argv[ic])) {
if (int skip = ShouldIgnoreClingArgument(argv[ic])) {
ic += skip;
continue;
} else {
// filter out even more undesirable options
if (strcmp("-p", argv[ic])) {
CheckForMinusW(argv[ic], diagnosticPragmas);
clingArgs.push_back(argv[ic]);
}
......@@ -4135,7 +4152,10 @@ int RootCling(int argc,
// ROOT::TMetaUtils::Error(0, "%s: option -c must come directly after the output file\n", argv[0]);
// return 1;
}
if (strcmp("-pipe", argv[ic]) != 0) {
if (int skip = ShouldIgnoreClingArgument(argv[ic])) {
i += (skip - 1); // for-loop takes care of the extra 1.
continue;
} else {
// filter out undesirable options
if (*argv[i] != '-' && *argv[i] != '+') {
......@@ -4731,7 +4751,7 @@ namespace genreflex {
numberOfHeaders++;
} else {
ROOT::TMetaUtils::Warning(0,
"*** genreflex: %s is not a vaild header name (.h and .hpp extensions expected)!\n",
"*** genreflex: %s is not a valid header name (.h and .hpp extensions expected)!\n",
headername.c_str());
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment