How to change the warning option of ACLiC Cling?

How do I change the warning option such as -Wall and -Wextra of ACLiC Cling?

In the past (with ROOT 5), I used a “rootlogon.C”:

void rootlogon(void) { // rootlogon.C ...
  // std::cout << "... rootlogon.C ..." << std::endl;
#if 1 /* 0 or 1 */
  { // customize ACLiC's behavior ...
    TString o;
    // customize MakeSharedLib
    o = TString(gSystem->GetMakeSharedLib());
    // fewer warnings
    // o = o.ReplaceAll(" -Wall ", " ");
    o = o.ReplaceAll(" -W ", " ");
    o = o.ReplaceAll(" -Woverloaded-virtual ", " ");
    gSystem->SetMakeSharedLib(o.Data());
    // customize MakeExe
    o = TString(gSystem->GetMakeExe());
    // fewer warnings
    // o = o.ReplaceAll(" -Wall ", " ");
    o = o.ReplaceAll(" -W ", " ");
    o = o.ReplaceAll(" -Woverloaded-virtual ", " ");
    gSystem->SetMakeExe(o.Data());
    // add custom "-D__ACLIC__" flag, if required
    if (gROOT->GetVersionCode() < 335105)
      gSystem->AddIncludePath("-D__ACLIC__");
  } // ... customize ACLiC's behavior
#endif /* 0 or 1 */
} // ... rootlogon.C

Thank you very much. It helps me cleaning up beginners’ scripts :slight_smile:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.