#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 intel():
    import os
    mkl=os.environ['MKLROOT']
    return """ 'FC=ftn' 'CC=cc' 'CXX=icpc' "FCFLAGS=-I"""+mkl+"""/include -O2 -qopenmp" --with-blas=no --with-lapack=no "--with-ext-linalg=-L"""+mkl+"""/lib/intel64 -lmkl_intel_lp64 -lmkl_core -lmkl_intel_thread -lpthread -lm" 'CFLAGS=-O2' 'FCLIBS= '"""

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 intel()+gpu()
#here follow the configuration instructions for the modules built
autogenargs = intel()
module_autogenargs.update({
'futile': intel()+gpu(),
'psolver': intel()+gpu(),
'bigdft': intel()+gpu()
})
