Skip to content
Snippets Groups Projects
Commit f1ecc493 authored by adrien-matta's avatar adrien-matta
Browse files

* Fixing warning with gcc

* adding flag allowing ninja to display clang color in compilation
* messages
parent 2b265e91
No related branches found
No related tags found
No related merge requests found
......@@ -31,7 +31,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${root_cflags}")
# If the compiler is Clang, silence the unrecognised flags
if(${CMAKE_CXX_COMPILER_ID} MATCHES ".*Clang.*")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qunused-arguments")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qunused-arguments -fcolor-diagnostics")
endif()
set(CMAKE_BINARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin )
......
......@@ -77,7 +77,7 @@ RootOutput::RootOutput(TString fileNameBase, TString treeNameBase)
// Init TAsciiFile objects
InitAsciiFiles();
gDirectory->cd(currentPath->GetPath());
Long64_t inter= -3000000000;
long int inter= -3000000000;
pRootTree->SetAutoFlush(inter);
pRootTree->SetAutoSave(-inter);
......
......@@ -165,10 +165,11 @@ void ProgressDisplay(clock_t& begin, clock_t& end, unsigned int& treated,unsigne
double remain = (total-treated)/mean_rate;
char* timer;
double check;
if(remain>60)
asprintf(&timer,"%dmin",(int)(remain/60.));
check=asprintf(&timer,"%dmin",(int)(remain/60.));
else
asprintf(&timer,"%ds",(int)(remain));
check=asprintf(&timer,"%ds",(int)(remain));
if(treated!=total)
printf("\r \033[1;31m ******* Progress: %.1f%% | Rate: %.1fk evt/s | Remain: %s *******\033[0m", percent,mean_rate/1000.,timer);
......
......@@ -23,6 +23,8 @@ std::string CORRECT_LIB_EXTENSION = ".so";
int main(int argc , char** argv){
int return_value;
// Build the lib list from the argument
std::string detlist="";
for(unsigned int i = 1 ; i < argc ; i++){
......@@ -91,7 +93,7 @@ int main(int argc , char** argv){
closedir (dir);
}
system("chmod 755 liblist");
return_value=system("chmod 755 liblist");
// Copy pcm and rootmap file
// Generate the target file for backward compatiblity
......@@ -110,8 +112,8 @@ int main(int argc , char** argv){
string cmd1 = "cp " + folderName+"/*.pcm lib/";
string cmd2 = "cp " + folderName+"/*.rootmap lib/" ;
system(cmd1.c_str());
system(cmd2.c_str());
return_value=system(cmd1.c_str());
return_value=system(cmd2.c_str());
}
}
}
......@@ -180,6 +182,6 @@ int main(int argc , char** argv){
path += "/NPLib/*/*.rootmap";
std::string command = "sed -i '' -e 's/"+INCORRECT_LIB_EXTENSION+"/"+CORRECT_LIB_EXTENSION+"/g' "+path;
system(command.c_str());
return_value=system(command.c_str());
return 0;
}
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