Skip to content
Snippets Groups Projects
Commit 26123322 authored by Freddie Akeroyd's avatar Freddie Akeroyd
Browse files

Fix MantidBuild refs #1195

parent d5530f67
No related branches found
No related tags found
No related merge requests found
......@@ -107,16 +107,15 @@ def getConfigFlags(command) :
res = flags
return res
def findBoost(boost_path,boost_append):
def findBoost(boost_path,boost_append,boost_lib):
#Find the boost_path and the boost append
startPath = '/usr/local/include/'
dirpath=os.listdir(startPath)
while(len(dirpath)):
for startPath in [ '/usr/include/', '/usr/local/include/' ] :
dirpath=os.listdir(startPath)
while(len(dirpath)):
try:
item=dirpath.pop(0)
if item.startswith('boost'):
for file in os.listdir(startPath+item):
print file
if file == 'weak_ptr.hpp':
boost_path = startPath
elif file.startswith('boost'):
......@@ -124,11 +123,12 @@ def findBoost(boost_path,boost_append):
except:
pass
dirpath=os.listdir('/usr/local/lib/')
while(len(dirpath)):
for startPath in [ '/usr/lib64/', '/usr/lib/', '/usr/local/lib/' ] :
dirpath=os.listdir(startPath)
while(len(dirpath)):
try:
item=dirpath.pop(0)
m=re.search("libboost_python(.*).so", item)
m=re.search(boost_lib+"(.*).so", item)
if m != None:
boost_append=m.group(1)
except:
......
......@@ -17,7 +17,7 @@ if os.name == 'posix':
#myenv.Append(CPPPATH='/usr/include/python' + sys.version[0:3])
myenv.Append(MYLIBLIST='python' + sys.version[0:3])
myenv.Replace(SHLIBSUFFIX='.so')
myenv.Append(MYLIBLIST='boost_python'+MantidBuild.findBoost('','')['append'])
myenv.Append(MYLIBLIST='boost_python'+MantidBuild.findBoost('','','libboost_python')['append'])
# windows
else:
#python_path = 'C:/Python25/'
......
......@@ -114,6 +114,7 @@ else:
boost_path=MantidBuild.procHeaderPath(ln,'BOOST_ROOT',boost_path)
poco_path=MantidBuild.procHeaderPath(ln,'POCO_ROOT',poco_path)
python_path=MantidBuild.procHeaderPath(ln,'PYTHON_LIB',python_path)
boost_append=MantidBuild.procHeader(ln,'BOOST_APPEND',boost_append)
f.close()
else:
boost_path=''
......@@ -123,7 +124,9 @@ else:
boost_append = ''
opencascade_path= '/opt/OpenCASCADE'
MantidBuild.findBoost(boost_path,boost_append)
boost_res = MantidBuild.findBoost(boost_path,boost_append,'libboost_regex')
boost_append = boost_res['append']
boost_path = boost_res['path']
print "POCO_ROOT: ",poco_path
print "BOOST_ROOT: ",boost_path
......@@ -158,6 +161,7 @@ elif platform.system() == 'Linux':
cppPaths.append(boost_path)
cppPaths.append(USRINCLUDE)
cppPaths.append(USRLOCALINCLUDE)
cppPaths.append(USRINCLUDE+'/muParser')
libDirList.append(USRLIB)
elif platform.system() == 'Darwin':
......
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