easyblock = 'CMakeMake'

name = 'OpenCoarrays'
version = '1.4.0'

homepage = 'http://www.opencoarrays.org/'
description = """A transport layer for coarray Fortran local_compilers."""

toolchain = {'name': 'GCC', 'version': '5.3.1-snapshot-20160419-2.25'}

source_urls = [
    'https://github.com/sourceryinstitute/opencoarrays/releases/download/%(version)s/']
sources = [SOURCE_TAR_GZ]

builddependencies = [('CMake', '3.3.1')]
dependencies = [('MPICH', '3.2')]

preconfigopts = 'CC=mpicc FC=mpif90'
# override easybuild default settings
configopts = '-DCMAKE_C_COMPILER=mpicc -DCMAKE_Fortran_COMPILER=mpif90'
separate_build_dir = True

sanity_check_paths = {
    'files': ['bin/caf', 'lib/libcaf_mpi.a'],
    'dirs': ['bin', 'lib'],
}

moduleclass = 'compiler'
