# This is an easyconfig file for EasyBuild, see http://hpcugent.github.io/easybuild

name = 'icc'
version = '2016.1.150'

homepage = 'http://software.intel.com/en-us/intel-compilers/'
description = "C and C++ compiler from Intel"

toolchain = {'name': 'dummy', 'version': ''}

sources = ['parallel_studio_xe_%(version_major)s_composer_edition_for_cpp_update%(version_minor)s.tgz']

checksums = ['4b93b0ff549e6bd8d1a8b9a441b235a8']

gccver = '4.9.3'
binutilsver = '2.25'
versionsuffix = '-GCC-%s-%s' % (gccver, binutilsver)

dependencies = [
    ('GCCcore', gccver),
    ('binutils', binutilsver, '', ('GCCcore', gccver)),
]

# list of regex for components to install
# full list of components can be obtained from pset/mediaconfig.xml in unpacked sources
# cfr. https://software.intel.com/en-us/articles/intel-composer-xe-2015-silent-installation-guide
components = ['intel-comp', 'intel-ccomp', 'intel-icc', 'intel-openmp', 'intel-ipsc?_', 'intel-gdb']

dontcreateinstalldir = 'True'

# license file
import os
license_file = os.path.join(os.getenv('HOME'), "licenses", "intel", "license.lic")

moduleclass = 'compiler'

# Salomon specific optimalization
modextravars = {
    'CC': 'icc',
    'CXX': 'icpc',
    'OPTFLAGS': '-O3 -xHost -ip',
    'DEBUGFLAGS': '-O0 -g'
}

# MIC paths
micldpath = 'compilers_and_libraries_%s/linux/compiler/lib/mic/' % version
modextrapaths = {
    'MIC_LD_LIBRARY_PATH' : [ micldpath ],
}
