Commit 79b2b8ca authored by Janek Kozicki's avatar Janek Kozicki Committed by Janek Kozicki

Fix #108

parent e3cd60b1
......@@ -197,7 +197,7 @@ def checkVersions():
# put here all yade compatibility tests with other libraries
import yade.libVersions
glutVer = yade.libVersions.getVersion('freeglut')
if(glutVer > (2,8,1) or glutVer == (-1,-1,-1)):
if((glutVer != None) and (glutVer > (2,8,1) or glutVer == (-1,-1,-1))):
print("\033[93mWarning: freeglut versions higher than 2.8.1 are known to crash\033[0m, see https://gitlab.com/yade-dev/trunk/merge_requests/160")
def userSession(gui='none',qapp=None):
......
......@@ -60,7 +60,7 @@ def getVersion(libName):
:param string libName: the name of the library
:return: tuple in format ``(major, minor, patchlevel)``
:return: tuple in format ``(major, minor, patchlevel)`` if ``libName`` exists. Otherwise it returns ``None``.
.. note:: library openblas has no properly defined version in header files, this function will return ``(0,0,0)`` for openblas. Parsing the version string would be unreliable. The mpi version detected by cmake sometimes is different than version detected by C++, this needs further investigation.
"""
......@@ -75,7 +75,8 @@ def getVersion(libName):
return cppVer[libName][0]
if((libName in cmakeVer) and (len(cmakeVer[libName])==2)):
return cmakeVer[libName][0]
raise RuntimeError("Could not find library version of ",libName)
#raise RuntimeError("Could not find library version of ",libName)
return None
def getAllVersionsCmake():
"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment