easyblock = 'CMakeMake'

name = 'OpenCoarrays'
version = '1.0.1'

homepage = 'http://www.opencoarrays.org'
description = """OpenCoarrays is an open-source software project for developing,
porting and tuning transport layers that support coarray Fortran
compilers."""

toolchain = {'name': 'GNU', 'version': '5.1.0-2.25'}

# Download eg. https://github.com/sourceryinstitute/opencoarrays/releases/download/v1.0.0/opencoarrays-1.0.0.tar.gz
source_urls = ['https://github.com/sourceryinstitute/%(namelower)s/releases/download/v%(version)s/']

sources = [
    SOURCELOWER_TAR_GZ,
]

dependencies = [
    ('MVAPICH2', '2.1')
]

builddependencies = [('CMake', '3.3.1')]

preconfigopts = "CC=mpicc FC=mpif90  "
configopts = "-DCMAKE_Fortran_COMPILER= -DCMAKE_C_COMPILER= "
configopts += "-DCMAKE_CXX_COMPILER= "

separate_build_dir = True

sanity_check_paths = {
    'files': [''],
    'dirs': ['lib']
}

moduleclass = 'lib'
