1 // Automatically generated SETUP.C for @PARMODULE@
6 const char *wd = gSystem->WorkingDirectory();
8 // Set include path for CINT (PARfile is unpacked as a subfolder of current workdir)
9 // TODO: prepend path instead of appending (not currently supported by ROOT!)
10 buf.Form(".include %s", wd);
11 gROOT->ProcessLine(buf.Data());
13 // Prepend include path for compiled code
14 buf.Form("-I%s %s", wd, gSystem->GetIncludePath());
15 gSystem->SetIncludePath(buf.Data());
17 // Prepend library path
18 buf.Form("%s:%s", wd, gSystem->GetDynamicPath());
19 gSystem->SetDynamicPath(buf.Data());
22 // TODO: disabled because it triggers actual library loading wherever it finds nested classes!
23 // (this is a ROOT bug)
24 // buf.Form("%s/lib@PARMODULE@.rootmap", wd);
25 // gInterpreter->UnloadLibraryMap("lib@PARMODULE@");
26 // gInterpreter->LoadLibraryMap(buf.Data());
28 // Append this PARfile's name to the list of currently enabled ones in an environment variable.
29 // The variable will be used by other PARfiles in order to correctly set some paths during the
30 // PARfile build process
31 const char *parEnvVarName = "ALICE_PARFILES_ENABLED";
32 TString parEnvVar = gSystem->Getenv(parEnvVarName);
33 if (!parEnvVar.IsNull()) {
34 parEnvVar.Append(" ");
36 parEnvVar.Append("@PARMODULE@");
37 gSystem->Setenv(parEnvVarName, parEnvVar.Data());
39 // Here we load the library, but beware: if using multiple PARfiles for overriding multiple
40 // AliRoot libraries, they must be loaded in the correct order. With the autoloading, it might
41 // happen that the *wrong* library gets loaded as a dependency
42 gSystem->Load("lib@PARMODULE@");