1import config.package 2import os 3 4class Configure(config.package.CMakePackage): 5 def __init__(self, framework): 6 config.package.CMakePackage.__init__(self, framework) 7 self.gitcommit = 'v5.2.0 ' 8 self.download = ['http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_5.2.0.tar.gz','git://https://github.com/xiaoyeli/superlu'] 9 self.functions = ['set_default_options'] 10 self.includes = ['slu_ddefs.h'] 11 self.liblist = [['libsuperlu.a']] 12 # SuperLU has NO support for 64 bit integers, use SuperLU_Dist if you need that 13 self.requires32bitint = 1; # 1 means that the package will not work with 64 bit integers 14 self.excludedDirs = ['SuperLU_DIST','SuperLU_MT'] 15 # SuperLU does not work with --download-fblaslapack with Compaqf90 compiler on windows. 16 # However it should work with intel ifort. 17 self.downloadonWindows= 1 18 self.hastests = 1 19 self.hastestsdatafiles= 1 20 return 21 22 def setupDependencies(self, framework): 23 config.package.CMakePackage.setupDependencies(self, framework) 24 self.blasLapack = self.framework.require('config.packages.BlasLapack',self) 25 self.deps = [self.blasLapack] 26 return 27 28 def formCMakeConfigureArgs(self): 29 args = config.package.CMakePackage.formCMakeConfigureArgs(self) 30 args.append('-DUSE_XSDK_DEFAULTS=YES') 31 32 args.append('-DTPL_BLAS_LIBRARIES="'+self.libraries.toString(self.blasLapack.dlib)+'"') 33 34 # Tests are broken on Apple since they depend on a shared library that is not resolved against BLAS 35 args.append('-Denable_tests=0') 36 # CMake in SuperLU should set this; but like many other packages it does not 37 args.append('-DCMAKE_INSTALL_NAME_DIR:STRING="'+os.path.join(self.installDir,self.libdir)+'"') 38 return args 39 40