##
# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild
# Authors::   Stephane Thiell <sthiell@stanford.edu>
##
easyblock = 'Binary'

name = 'OptiX'
version = '3.8.0'

homepage = 'https://developer.nvidia.com/optix'
description = """OptiX is NVIDIA SDK for easy ray tracing performance.
 It provides a simple framework for accessing the GPU’s massive ray tracing
 power using state-of-the-art GPU algorithms."""

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

# Registration required. Download links:
# https://developer.nvidia.com/designworks/optix/download
# https://developer.nvidia.com/designworks/optix/downloads/legacy
sources = ['NVIDIA-OptiX-SDK-%(version)s-linux64.run']

checksums = [
    'ecf63cf32b87defa36d3cd283d085314',    # NVIDIA-OptiX-SDK-3.8.0-linux64.run
]

install_cmd = "./" + sources[0] + " --skip-license --prefix=%(installdir)s"

sanity_check_paths = {
    'files': ["include/optix.h", "include/optix_cuda.h", "lib64/liboptix.%s" % SHLIB_EXT,
              "lib64/liboptixu.%s" % SHLIB_EXT],
    'dirs': []
}

modextravars = {'OPTIX_HOME': '%(installdir)s'}

moduleclass = 'vis'
