Skip to content

Commit

Permalink
Pass NDEBUG, DEBUG, _DEBUG as seen by ROOT:
Browse files Browse the repository at this point in the history
Before, cling::CIFactory was deciding on those flags, but libCling
was always compiled in release mode. Instead, pick the flags from libCore.
  • Loading branch information
Axel-Naumann committed May 22, 2018
1 parent dbf8d74 commit cd7ecf5
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion core/base/src/TROOT.cxx
Expand Up @@ -2069,7 +2069,25 @@ void TROOT::InitInterpreter()
exit(1);
}

fInterpreter = CreateInterpreter(gInterpreterLib);
const char *interpArgs[] = {
#ifdef NDEBUG
"-DNDEBUG",
#else
"-UNDEBUG",
#endif
#ifdef DEBUG
"-DDEBUG",
#else
"-UDEBUG",
#endif
#ifdef _DEBUG
"-D_DEBUG",
#else
"-U_DEBUG",
#endif
nullptr};

fInterpreter = CreateInterpreter(gInterpreterLib, interpArgs);

fCleanups->Add(fInterpreter);
fInterpreter->SetBit(kMustCleanup);
Expand Down

0 comments on commit cd7ecf5

Please sign in to comment.