#This is the configuration file for the BigDFT installer
#This is a python script which is executed by the build suite 
 
#Add the condition testing to run tests and includes PyYaml
conditions.add("testing")
#List the module the this rcfile will build
moduleset = 'bigdft'
modules = ['spred',]
#example of the potentialities of the python syntax in this file

def gpu():
    import os
    cuda=os.environ['CUDATOOLKIT_HOME']
    return """ '--enable-opencl' '--enable-cuda-gpu' "--with-cuda-path="""+cuda+"""" "--with-ocl-path="""+cuda+"""" "LIBS=-L"""+cuda+"""/lib64 -lnvToolsExt -lstdc++" """

def env_configuration():
    return """"FC=ftn" "FCFLAGS=-em -O thread2" "--with-blas=no" "--with-lapack=no" "--with-ext-linalg= " "CFLAGS=-O2" "FCLIBS= " """
#here follow the configuration instructions for the modules built
autogenargs = env_configuration()
module_autogenargs.update({
'futile': env_configuration()+gpu(),
'psolver': env_configuration()+gpu(),
'bigdft': env_configuration()+gpu(),
'spred': env_configuration()+gpu(),
})
