Changeset 19264
- Timestamp:
- 10/22/18 19:21:15 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/cmake/rootlogon.C.in
r19242 r19264 44 44 #include <iomanip> 45 45 46 #if defined (R__ADD_LIBRARY_PATH) && defined (R__LOAD_LIBRARY) 47 R__ADD_LIBRARY_PATH(${PROJECT_BINARY_DIR}/dictionary) 48 R__LOAD_LIBRARY(libmars.so) 49 #endif 46 50 47 51 Bool_t isloaded() … … 52 56 } 53 57 54 void unload() 55 { 56 if (!isloaded()) 57 return; 58 59 cout << "Unloading 'libmars.so'... " << flush; 60 if (gSystem->Unload("libmars.so")) 61 cout << "error!" << endl; 62 else 63 cout << "done." << endl << endl; 64 } 65 66 bool load(TString &dir) 58 bool load() 67 59 { 68 60 if (isloaded()) 69 return ;61 return true; 70 62 71 cout << "\033[33m\033[1m" << "Loading ' " << dir << "/libmars.so'... " << "\033[0m" << flush;63 cout << "\033[33m\033[1m" << "Loading 'libmars.so'... " << "\033[0m" << flush; 72 64 73 if (dir.IsNull()) 74 dir = "./"; 75 76 if (gSystem->Load(dir+"/libmars.so")!=0) 65 if (gSystem->Load("${PROJECT_BINARY_DIR}/libmars.so")!=0) 77 66 { 78 67 cout << "\033[31m\033[1m" << "error!" << endl; … … 98 87 cout << endl; 99 88 100 if (!load("${PROJECT_BINARY_DIR}")) 89 if (gROOT->GetVersionInt()<60000 && !load()) 90 return; 91 92 MLog::RedirectErrorHandler(MLog::kColor); 93 94 cout << "\033[32m" << "Welcome to the Mars Root environment." << "\033[0m" << endl; 95 cout << endl; 96 97 if (gROOT->GetVersionInt()>=60000) 101 98 return; 102 103 MLog::RedirectErrorHandler(MLog::kColor);104 99 105 100 // This initialized the thread factory. This is needed to supress … … 178 173 gSystem->SetFlagsOpt(opt); 179 174 gSystem->SetFlagsDebug(dbg); 180 181 182 cout << "\033[32m" << "Welcome to the Mars Root environment." << "\033[0m" << endl;183 cout << endl;184 175 }
Note:
See TracChangeset
for help on using the changeset viewer.