Skip to content
Snippets Groups Projects
Commit 155ff9ee authored by Florian Feldbauer's avatar Florian Feldbauer
Browse files

compatibility for gcc4.7.2

parent df48eafb
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,22 @@ local rlibs = [ SHELL "$(ROOTSYS)/bin/root-config --libs" ] ;
ROOTLIBS = [ MATCH "(.*)[\n]" : $(rlibs) ] ;
BOOSTLIBS = -lboost_date_time -lboost_filesystem -lboost_program_options -lboost_regex -lboost_serialization -lboost_system -lboost_thread -lboost_test_exec_monitor -lboost_timer ;
rule split-stack-cond ( properties * )
{
local toolset = [ MATCH <toolset>(.*) : $(properties) ] ;
if $(toolset) = gcc
{
local gcc-ver = [ MATCH <toolset-gcc:version>(.*) : $(properties) ] ;
local major = [ MATCH (.)\..* : $(gcc-ver) ] ;
local minor = [ MATCH .\.(.).* : $(gcc-ver) ] ;
if $(major) > 4 | ( $(major) = 4 & $(minor) >= 7 )
{
return <cxxflags>-ftemplate-depth=256 ;
}
}
}
project :
requirements <include>./
<include>$(extern)/include
......@@ -13,6 +29,7 @@ project :
<link>static
<cxxflags>-std=gnu++0x
<cxxflags>-pthread
<conditional>@split-stack-cond
<linkflags>$(ROOTLIBS)
<linkflags>$(BOOSTLIBS)
<linkflags>-pthread
......
......@@ -125,7 +125,7 @@ double AbsLh::calcLogLh(fitParams& theParamVal){
theThreads.push_back(std::thread(&AbsLh::ThreadfuncData, this, eventMin, eventMax,
std::ref(threadDataVec.at(i).logLH_data),
std::ref(threadDataVec.at(i).weightSum), theParamVal));
std::ref(threadDataVec.at(i).weightSum), std::ref(theParamVal)));
}
for(auto it = theThreads.begin(); it != theThreads.end(); ++it){
(*it).join();
......@@ -139,7 +139,7 @@ double AbsLh::calcLogLh(fitParams& theParamVal){
int eventMax = (i==_noOfThreads-1) ? (_evtMCVec.size() - 1) : (i+1)*eventStepMC - 1;
theThreads.push_back(std::thread(&AbsLh::ThreadfuncMc, this, eventMin, eventMax,
std::ref(threadDataVec.at(i).LH_mc), theParamVal));
std::ref(threadDataVec.at(i).LH_mc), std::ref(theParamVal)));
}
for(auto it = theThreads.begin(); it != theThreads.end(); ++it){
(*it).join();
......@@ -181,7 +181,7 @@ void AbsLh::calcLogLhDataClient(fitParams& theParamVal,
theThreads.push_back(std::thread(&AbsLh::ThreadfuncData, this, eventMin, eventMax,
std::ref(threadDataVec.at(i).logLH_data),
std::ref(threadDataVec.at(i).weightSum), theParamVal));
std::ref(threadDataVec.at(i).weightSum), std::ref(theParamVal)));
}
for(auto it = theThreads.begin(); it != theThreads.end(); ++it){
(*it).join();
......@@ -196,7 +196,7 @@ void AbsLh::calcLogLhDataClient(fitParams& theParamVal,
theThreads.push_back(std::thread(&AbsLh::ThreadfuncMc, this, eventMin, eventMax,
std::ref(threadDataVec.at(i).LH_mc), theParamVal));
std::ref(threadDataVec.at(i).LH_mc), std::ref(theParamVal)));
}
for(auto it = theThreads.begin(); it != theThreads.end(); ++it){
(*it).join();
......
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