Exemple #1
0
    def configure_step(self):
        """Configure build: set config options and configure"""

        shlib_ext = get_shared_lib_ext()

        if LooseVersion(self.version) < LooseVersion("4.3"):
            self.cfg.update('configopts', "--enable-shared")

            if self.toolchain.options['pic']:
                self.cfg.update('configopts', '--with-pic')

            tup = (os.getenv('FFLAGS'), os.getenv('MPICC'), os.getenv('F90'))
            self.cfg.update('configopts', 'FCFLAGS="%s" CC="%s" FC="%s"' % tup)

            # add -DgFortran to CPPFLAGS when building with GCC
            if self.toolchain.comp_family() == toolchain.GCC:  #@UndefinedVariable
                self.cfg.update('configopts', 'CPPFLAGS="%s -DgFortran"' % os.getenv('CPPFLAGS'))

            ConfigureMake.configure_step(self)

        else:
            for (dep, libname) in [('cURL', 'curl'), ('HDF5', 'hdf5'), ('Szip', 'sz'), ('zlib', 'z'),
                                   ('PnetCDF', 'pnetcdf')]:
                dep_root = get_software_root(dep)
                dep_libdir = get_software_libdir(dep)

                if dep_root:
                    incdir = os.path.join(dep_root, 'include')
                    self.cfg.update('configopts', '-D%s_INCLUDE_DIR=%s ' % (dep.upper(), incdir))

                    if dep == 'HDF5':
                        env.setvar('HDF5_ROOT', dep_root)
                        self.cfg.update('configopts', '-DUSE_HDF5=ON')

                        hdf5cmvars = {
                            # library name: (cmake option suffix in netcdf<4.4, cmake option suffix in netcfd>=4.4)
                            'hdf5': ('LIB', 'C_LIBRARY'),
                            'hdf5_hl': ('HL_LIB', 'HL_LIBRARY'),
                        }

                        for libname in hdf5cmvars:
                            if LooseVersion(self.version) < LooseVersion("4.4"):
                                cmvar = hdf5cmvars[libname][0]
                            else:
                                cmvar = hdf5cmvars[libname][1]
                            libhdf5 = os.path.join(dep_root, dep_libdir, 'lib%s.%s' % (libname, shlib_ext))
                            self.cfg.update('configopts', '-DHDF5_%s=%s ' % (cmvar, libhdf5))
                            # 4.4 forgot to set HDF5_<lang>_LIBRARIES
                            if LooseVersion(self.version) == LooseVersion("4.4.0"):
                                lang = 'HL' if cmvar[0] == 'H' else 'C'
                                self.cfg.update('configopts', '-DHDF5_%s_LIBRARIES=%s ' % (lang, libhdf5))

                    elif dep == 'PnetCDF':
                        self.cfg.update('configopts', '-DENABLE_PNETCDF=ON')

                    else:
                        libso = os.path.join(dep_root, dep_libdir, 'lib%s.%s' % (libname, shlib_ext))
                        self.cfg.update('configopts', '-D%s_LIBRARY=%s ' % (dep.upper(), libso))

            CMakeMake.configure_step(self)
Exemple #2
0
    def configure_step(self):
        """Configure build: set config options and configure"""

        if LooseVersion(self.version) < LooseVersion("4.3"):
            self.cfg.update('configopts', "--enable-shared")

            if self.toolchain.options['pic']:
                self.cfg.update('configopts', '--with-pic')

#            tup = (os.getenv('FFLAGS'), os.getenv('MPICC'), os.getenv('F90'))
            tup = (os.getenv('FFLAGS'), os.getenv('CC'), os.getenv('F90'))
            self.cfg.update('configopts', 'FCFLAGS="%s" CC="%s" FC="%s"' % tup)

            # add -DgFortran to CPPFLAGS when building with GCC
            if self.toolchain.comp_family() == toolchain.GCC:  #@UndefinedVariable
                self.cfg.update('configopts', 'CPPFLAGS="%s -DgFortran"' % os.getenv('CPPFLAGS'))

            ConfigureMake.configure_step(self)

        else:
            hdf5 = get_software_root('HDF5')
            if hdf5:
                env.setvar('HDF5_ROOT', hdf5)

            CMakeMake.configure_step(self)
Exemple #3
0
    def configure_step(self):
        """Configure build: set config options and configure"""

        if LooseVersion(self.version) < LooseVersion("4.3"):
            self.cfg.update('configopts', "--enable-shared")

            if self.toolchain.options['pic']:
                self.cfg.update('configopts', '--with-pic')

            tup = (os.getenv('FFLAGS'), os.getenv('MPICC'), os.getenv('F90'))
            self.cfg.update('configopts', 'FCFLAGS="%s" CC="%s" FC="%s"' % tup)

            # add -DgFortran to CPPFLAGS when building with GCC
            if self.toolchain.comp_family(
            ) == toolchain.GCC:  #@UndefinedVariable
                self.cfg.update(
                    'configopts',
                    'CPPFLAGS="%s -DgFortran"' % os.getenv('CPPFLAGS'))

            ConfigureMake.configure_step(self)

        else:
            hdf5 = get_software_root('HDF5')
            if hdf5:
                env.setvar('HDF5_ROOT', hdf5)

            CMakeMake.configure_step(self)
Exemple #4
0
 def install_step(self):
     """Custom installation procedure for BamTools."""
     if LooseVersion(self.version) < LooseVersion('2.5.0'):
         self.cfg['files_to_copy'] = ['bin', 'lib', 'include', 'docs', 'LICENSE', 'README']
         MakeCp.install_step(self)
     else:
         CMakeMake.install_step(self)
Exemple #5
0
    def install_step(self):
        """Install with cmake install and pip install"""
        build_dir = change_dir(self.cfg['start_dir'])
        PythonPackage.install_step(self)

        # Reset installopts (set by PythonPackage)
        self.cfg['installopts'] = ''
        change_dir(build_dir)
        CMakeMake.install_step(self)
Exemple #6
0
 def configure_step(self):
     """Custom configuration procedure for Eigen."""
     # start using CMake for Eigen 3.3.4 and newer versions
     # not done for older versions, since this implies using (a dummy-built) CMake as a build dependency,
     # which is a bit strange for a header-only library like Eigen...
     if LooseVersion(self.version) >= LooseVersion('3.3.4'):
         self.cfg['separate_build_dir'] = True
         # avoid that include files are installed into include/eigen3/Eigen, should be include/Eigen
         self.cfg.update('configopts', "-DINCLUDE_INSTALL_DIR=%s" % os.path.join(self.installdir, 'include'))
         CMakeMake.configure_step(self)
 def configure_step(self):
     """Custom configuration procedure for Eigen."""
     # start using CMake for Eigen 3.3.4 and newer versions
     # not done for older versions, since this implies using (a dummy-built) CMake as a build dependency,
     # which is a bit strange for a header-only library like Eigen...
     if LooseVersion(self.version) >= LooseVersion('3.3.4'):
         self.cfg['separate_build_dir'] = True
         # avoid that include files are installed into include/eigen3/Eigen, should be include/Eigen
         self.cfg.update('configopts', "-DINCLUDE_INSTALL_DIR=%s" % os.path.join(self.installdir, 'include'))
         CMakeMake.configure_step(self)
    def configure_step(self):
        """Configure build: set config options and configure"""

        shlib_ext = get_shared_lib_ext()

        if LooseVersion(self.version) < LooseVersion("4.3"):
            self.cfg.update('configopts', "--enable-shared")

            if self.toolchain.options['pic']:
                self.cfg.update('configopts', '--with-pic')

            tup = (os.getenv('FFLAGS'), os.getenv('MPICC'), os.getenv('F90'))
            self.cfg.update('configopts', 'FCFLAGS="%s" CC="%s" FC="%s"' % tup)

            # add -DgFortran to CPPFLAGS when building with GCC
            if self.toolchain.comp_family(
            ) == toolchain.GCC:  #@UndefinedVariable
                self.cfg.update(
                    'configopts',
                    'CPPFLAGS="%s -DgFortran"' % os.getenv('CPPFLAGS'))

            ConfigureMake.configure_step(self)

        else:
            self.cfg.update(
                'configopts',
                '-DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG " '
            )
            for (dep, libname) in [('cURL', 'curl'), ('HDF5', 'hdf5'),
                                   ('Szip', 'sz'), ('zlib', 'z')]:
                dep_root = get_software_root(dep)
                dep_libdir = get_software_libdir(dep)
                if dep_root:
                    incdir = os.path.join(dep_root, 'include')
                    self.cfg.update(
                        'configopts',
                        '-D%s_INCLUDE_DIR=%s ' % (dep.upper(), incdir))
                    if dep == 'HDF5':
                        env.setvar('HDF5_ROOT', dep_root)
                        libhdf5 = os.path.join(dep_root, dep_libdir,
                                               'libhdf5.%s' % shlib_ext)
                        self.cfg.update('configopts',
                                        '-DHDF5_LIB=%s ' % libhdf5)
                        libhdf5_hl = os.path.join(dep_root, dep_libdir,
                                                  'libhdf5_hl.%s' % shlib_ext)
                        self.cfg.update('configopts',
                                        '-DHDF5_HL_LIB=%s ' % libhdf5_hl)
                    else:
                        libso = os.path.join(dep_root, dep_libdir,
                                             'lib%s.%s' % (libname, shlib_ext))
                        self.cfg.update(
                            'configopts',
                            '-D%s_LIBRARY=%s ' % (dep.upper(), libso))

            CMakeMake.configure_step(self)
Exemple #9
0
    def configure_step(self):
        """Configure BamTools build."""
        # BamTools requires an out of source build.
        builddir = os.path.join(self.cfg['start_dir'], 'build')
        try:
            mkdir(builddir)
            os.chdir(builddir)
        except OSError as err:
            raise EasyBuildError("Failed to move to %s: %s", builddir, err)

        CMakeMake.configure_step(self, srcdir='..')
Exemple #10
0
    def configure_step(self):
        """Custom configuration for ROOT, add configure options."""

        # using ./configure is deprecated/broken in recent versions, need to use CMake instead
        if LooseVersion(self.version.lstrip('v')) >= LooseVersion('6.10'):
            if self.cfg['arch']:
                raise EasyBuildError("Specified value '%s' for 'arch' is not used, should not be set", self.cfg['arch'])

            cfitsio_root = get_software_root('CFITSIO')
            if cfitsio_root:
                self.cfg.update('configopts', '-DCFITSIO=%s' % cfitsio_root)

            fftw_root = get_software_root('FFTW')
            if fftw_root:
                self.cfg.update('configopts', '-Dbuiltin_fftw3=OFF -DFFTW_DIR=%s' % fftw_root)

            gsl_root = get_software_root('GSL')
            if gsl_root:
                self.cfg.update('configopts', '-DGSL_DIR=%s' % gsl_root)

            mesa_root = get_software_root('Mesa')
            if mesa_root:
                self.cfg.update('configopts', '-DDOPENGL_INCLUDE_DIR=%s' % os.path.join(mesa_root, 'include'))
                self.cfg.update('configopts', '-DOPENGL_gl_LIBRARY=%s' % os.path.join(mesa_root, 'lib', 'libGL.so'))

            python_root = get_software_root('Python')
            if python_root:
                pyshortver = '.'.join(get_software_version('Python').split('.')[:2])
                self.cfg.update('configopts', '-DPYTHON_EXECUTABLE=%s' % os.path.join(python_root, 'bin', 'python'))
                python_inc_dir = os.path.join(python_root, 'include', 'python%s' % pyshortver)
                self.cfg.update('configopts', '-DPYTHON_INCLUDE_DIR=%s' % python_inc_dir)
                python_lib = os.path.join(python_root, 'lib', 'libpython%s.so' % pyshortver)
                self.cfg.update('configopts', '-DPYTHON_LIBRARY=%s' % python_lib)

            if get_software_root('X11'):
                self.cfg.update('configopts', '-Dx11=ON')

            self.cfg['separate_build_dir'] = True
            CMakeMake.configure_step(self)
        else:
            if self.cfg['arch'] is None:
                raise EasyBuildError("No architecture specified to pass to configure script")

            self.cfg.update('configopts', "--etcdir=%s/etc/root " % self.installdir)

            cmd = "%s ./configure %s --prefix=%s %s" % (self.cfg['preconfigopts'],
                                                        self.cfg['arch'],
                                                        self.installdir,
                                                        self.cfg['configopts'])

            run_cmd(cmd, log_all=True, log_ok=True, simple=True)
Exemple #11
0
 def extra_options(extra_vars=None):
     """Easyconfig parameters specific to Python packages thar are configured/built/installed via CMake"""
     extra_vars = PythonPackage.extra_options(extra_vars=extra_vars)
     extra_vars = CMakeMake.extra_options(extra_vars=extra_vars)
     # Disable runtest again (set to True by PythonPackage which is not understood by CMakeMake.test_step)
     extra_vars['runtest'][0] = None
     return extra_vars
 def extra_options():
     extra_vars = CMakeMake.extra_options()
     extra_vars.update({
         'with_python_bindings': [True, "Try to build Open Babel's Python bindings. (-DPYTHON_BINDINGS=ON)", CUSTOM],
     })
     extra_vars['separate_build_dir'][0] = True
     return extra_vars
 def extra_options(**kwargs):
     """Custom easyconfig parameters for LAMMPS"""
     extra_vars = CMakeMake.extra_options()
     extra_vars.update({
         # see https://developer.nvidia.com/cuda-gpus
         'cuda_compute_capabilities':
         [[], "List of CUDA compute capabilities to build with", CUSTOM],
         'general_packages': [
             None,
             "List of general packages without '%s' prefix." % PKG_PREFIX,
             MANDATORY
         ],
         'kokkos': [True, "Enable kokkos build.", CUSTOM],
         'kokkos_arch': [
             None,
             "Set kokkos processor arch manually, if auto-detection doesn't work.",
             CUSTOM
         ],
         'user_packages': [
             None,
             "List user packages without '%s' prefix." % PKG_USER_PREFIX,
             MANDATORY
         ],
     })
     extra_vars['separate_build_dir'][0] = True
     return extra_vars
Exemple #14
0
    def extra_options():
        """Custom easyconfig parameters for NEURON."""

        extra_vars = {
            'paranrn': [True, "Enable support for distributed simulations.", CUSTOM],
        }
        return CMakeMake.extra_options(extra_vars)
Exemple #15
0
 def extra_options():
     extra_vars = CMakeMake.extra_options()
     extra_vars.update({
         'assertions': [
             True, "Enable assertions.  Helps to catch bugs in Clang.",
             CUSTOM
         ],
         'build_targets': [
             None,
             "Build targets for LLVM (host architecture if None). Possible values: "
             + ', '.join(CLANG_TARGETS), CUSTOM
         ],
         'bootstrap': [True, "Bootstrap Clang using GCC", CUSTOM],
         'usepolly': [False, "Build Clang with polly", CUSTOM],
         'build_lld': [False, "Build the LLVM lld linker", CUSTOM],
         'default_openmp_runtime': [
             None,
             "Default OpenMP runtime for clang (for example, 'libomp')",
             CUSTOM
         ],
         'enable_rtti': [False, "Enable Clang RTTI", CUSTOM],
         'libcxx': [False, "Build the LLVM C++ standard library", CUSTOM],
         'static_analyzer':
         [True, "Install the static analyser of Clang", CUSTOM],
         'skip_all_tests': [False, "Skip running of tests", CUSTOM],
         # The sanitizer tests often fail on HPC systems due to the 'weird' environment.
         'skip_sanitizer_tests':
         [True, "Do not run the sanitizer tests", CUSTOM],
     })
     # disable regular out-of-source build, too simplistic for Clang to work
     extra_vars['separate_build_dir'][0] = False
     return extra_vars
Exemple #16
0
 def extra_options(extra_vars=None):
     """Easyconfig parameters specific to Python packages thar are configured/built/installed via CMake"""
     extra_vars = PythonPackage.extra_options(extra_vars=extra_vars)
     extra_vars = CMakeMake.extra_options(extra_vars=extra_vars)
     # enable out-of-source build
     extra_vars['separate_build_dir'][0] = True
     return extra_vars
Exemple #17
0
 def extra_options():
     """Custom easyconfig parameters for Libint."""
     extra_vars = {
         'libint_compiler_configopts': [True, "Configure options for Libint compiler", CUSTOM],
         'with_fortran': [False, "Enable Fortran support", CUSTOM],
     }
     return CMakeMake.extra_options(extra_vars)
Exemple #18
0
 def extra_options():
     extra_vars = [
         ('assertions', [True, "Enable assertions.  Helps to catch bugs in Clang.  (default: True)", CUSTOM]),
         ('build_targets', [["X86"], "Build targets for LLVM. Possible values: all, AArch64, ARM, CppBackend, Hexagon, " +
                            "Mips, MBlaze, MSP430, NVPTX, PowerPC, Sparc, SystemZ, X86, XCore (default: X86)", CUSTOM]),
     ]
     return CMakeMake.extra_options(extra_vars)
 def extra_options():
     extra_vars = CMakeMake.extra_options()
     extra_vars.update({
         'double_precision': [
             None,
             "Build with double precision enabled (-DGMX_DOUBLE=ON), " +
             "default is to build double precision unless CUDA is enabled",
             CUSTOM
         ],
         'mpisuffix': [
             '_mpi',
             "Suffix to append to MPI-enabled executables (only for GROMACS < 4.6)",
             CUSTOM
         ],
         'mpiexec':
         ['mpirun', "MPI executable to use when running tests", CUSTOM],
         'mpiexec_numproc_flag': [
             '-np',
             "Flag to introduce the number of MPI tasks when running tests",
             CUSTOM
         ],
         'mpi_numprocs':
         [0, "Number of MPI tasks to use when running tests", CUSTOM],
         'ignore_plumed_version_check': [
             False, "Ignore the version compatibility check for PLUMED",
             CUSTOM
         ],
     })
     extra_vars['separate_build_dir'][0] = True
     return extra_vars
Exemple #20
0
 def extra_options():
     extra_vars = CMakeMake.extra_options()
     extra_vars.update({
         'blas_auto_detect': [
             False,
             "Let FlexiBLAS autodetect the BLAS libraries during configuration",
             CUSTOM
         ],
         'enable_lapack': [
             True,
             "Enable LAPACK support, also includes the wrappers around LAPACK",
             CUSTOM
         ],
         'flexiblas_default': [
             None,
             "Default BLAS lib to set at compile time. If not defined, " +
             "the first BLAS lib in backends or the list of dependencies is set as default",
             CUSTOM
         ],
         'backends': [
             None,
             "List of (build)dependency names to use as BLAS library backends, or "
             + "'imkl', which does not need to be a (build)dependency." +
             "If not defined, use the list of dependencies.", CUSTOM
         ],
     })
     extra_vars['separate_build_dir'][0] = True
     return extra_vars
Exemple #21
0
 def extra_options(extra_vars=None):
     """Easyconfig parameters specific to PyBind11: Set defaults"""
     extra_vars = PythonPackage.extra_options(extra_vars=extra_vars)
     extra_vars = CMakeMake.extra_options(extra_vars=extra_vars)
     extra_vars['use_pip'][0] = True
     extra_vars['sanity_pip_check'][0] = True
     extra_vars['download_dep_fail'][0] = True
     return extra_vars
Exemple #22
0
 def extra_options():
     """
     Define extra options needed by Geant4
     """
     extra_vars = {
         'arch': [None, "Target architecture", CUSTOM],
     }
     return CMakeMake.extra_options(extra_vars)
Exemple #23
0
    def install_step(self):
        """
        Install by copying files to install dir
        """
        if LooseVersion(self.version) >= LooseVersion('3.3.4'):
            CMakeMake.install_step(self)
        else:
            mkdir(os.path.join(self.installdir, 'include'), parents=True)
            for subdir in ['Eigen', 'unsupported']:
                srcdir = os.path.join(self.cfg['start_dir'], subdir)
                destdir = os.path.join(self.installdir, os.path.join('include', subdir))
                copy_dir(srcdir, destdir, ignore=shutil.ignore_patterns('CMakeLists.txt'))

            if LooseVersion(self.version) >= LooseVersion('3.0'):
                srcfile = os.path.join(self.cfg['start_dir'], 'signature_of_eigen3_matrix_library')
                destfile = os.path.join(self.installdir, 'include/signature_of_eigen3_matrix_library')
                copy_file(srcfile, destfile)
Exemple #24
0
    def extra_options():
        """Extra easyconfig parameters specific to PSI."""

        extra_vars = {
            # always include running PSI unit tests (takes about 2h or less)
            'runtest': ["tests TESTFLAGS='-u -q'", "Run tests included with PSI, without interruption.", BUILD],
        }
        return CMakeMake.extra_options(extra_vars)
Exemple #25
0
 def extra_options():
     """
     Define custom easyconfig parameters for SuperLU.
     """
     extra_vars = {
         'build_shared_libs': [False, "Build shared library (instead of static library)", CUSTOM],
     }
     return CMakeMake.extra_options(extra_vars)
    def install_step(self):
        """
        Install by copying files to install dir
        """
        if LooseVersion(self.version) >= LooseVersion('3.3.4'):
            CMakeMake.install_step(self)
        else:
            mkdir(os.path.join(self.installdir, 'include'), parents=True)
            for subdir in ['Eigen', 'unsupported']:
                srcdir = os.path.join(self.cfg['start_dir'], subdir)
                destdir = os.path.join(self.installdir, os.path.join('include', subdir))
                copy_dir(srcdir, destdir, ignore=shutil.ignore_patterns('CMakeLists.txt'))

            if LooseVersion(self.version) >= LooseVersion('3.0'):
                srcfile = os.path.join(self.cfg['start_dir'], 'signature_of_eigen3_matrix_library')
                destfile = os.path.join(self.installdir, 'include/signature_of_eigen3_matrix_library')
                copy_file(srcfile, destfile)
Exemple #27
0
    def extra_options(extra_vars=None):
        """Extra easyconfig parameters for BamTools."""
        extra_vars = MakeCp.extra_options()

        # files_to_copy is not mandatory here, since we overwrite it in install_step
        extra_vars['files_to_copy'][2] = CUSTOM

        return CMakeMake.extra_options(extra_vars=extra_vars)
 def extra_options():
     """
     Define extra options needed by Geant4
     """
     extra_vars = {
         'arch': [None, "Target architecture", CUSTOM],
     }
     return CMakeMake.extra_options(extra_vars)
Exemple #29
0
    def extra_options():
        """Extra easyconfig parameters specific to PSI."""

        extra_vars = {
            # always include running PSI unit tests (takes about 2h or less)
            'runtest': ["tests TESTFLAGS='-u -q'", "Run tests included with PSI, without interruption.", BUILD],
        }
        return CMakeMake.extra_options(extra_vars)
Exemple #30
0
 def extra_options():
     """Custom easyconfig parameters specific to OpenCV."""
     extra_vars = CMakeMake.extra_options()
     extra_vars.update({
         'cpu_dispatch': ['NONE', "Value to pass to -DCPU_DISPATCH configuration option", CUSTOM],
     })
     extra_vars['separate_build_dir'][0] = True
     return extra_vars
 def extra_options():
     extra_vars = CMakeMake.extra_options()
     extra_vars.update({
         'default_platform': ['openPBS', "Default cluster platform to set", CUSTOM],
     })
     # Out of source build doesn't work due to sub tools beeing 'make'd
     extra_vars['separate_build_dir'][0] = False
     return extra_vars
 def extra_options():
     """
     Define custom easyconfig parameters for SuperLU.
     """
     extra_vars = {
         'build_shared_libs': [False, "Build shared library (instead of static library)", CUSTOM],
     }
     return CMakeMake.extra_options(extra_vars)
 def extra_options():
     extra_vars = {
         'with_python_bindings': [
             True,
             "Try to build Open Babel's Python bindings. (-DPYTHON_BINDINGS=ON)",
             CUSTOM
         ],
     }
     return CMakeMake.extra_options(extra_vars)
Exemple #34
0
 def extra_options():
     extra_vars = {
         'double_precision': [False, "Build with double precision enabled (-DGMX_DOUBLE=ON)", CUSTOM],
         'mpisuffix': ['_mpi', "Suffix to append to MPI-enabled executables (only for GROMACS < 4.6)", CUSTOM],
         'mpiexec': ['mpirun', "MPI executable to use when running tests", CUSTOM],
         'mpiexec_numproc_flag': ['-np', "Flag to introduce the number of MPI tasks when running tests", CUSTOM],
         'mpi_numprocs': [0, "Number of MPI tasks to use when running tests", CUSTOM],
     }
     return CMakeMake.extra_options(extra_vars)
Exemple #35
0
 def extra_options():
     """Define custom easyconfig parameters for ELSI."""
     extra_vars = CMakeMake.extra_options()
     extra_vars.update({
         'build_internal_pexsi': [None, "Build internal PEXSI solver", CUSTOM],
     })
     extra_vars['separate_build_dir'][0] = True
     extra_vars['build_shared_libs'][0] = True
     return extra_vars
Exemple #36
0
    def extra_options():
        extra_vars = [
            ('assertions', [True, "Enable assertions.  Helps to catch bugs in Clang.", CUSTOM]),
            ('build_targets', [["X86"], "Build targets for LLVM. Possible values: " + ', '.join(CLANG_TARGETS), CUSTOM]),
            ('bootstrap', [True, "Bootstrap Clang using GCC", CUSTOM]),
            ('usepolly', [False, "Build Clang with polly", CUSTOM]),
        ]

        return CMakeMake.extra_options(extra_vars)
Exemple #37
0
 def extra_options():
     """Custom easyconfig parameters specific to OpenCV."""
     extra_vars = {
         'cpu_dispatch': [
             'NONE', "Value to pass to -DCPU_DISPATCH configuration option",
             CUSTOM
         ],
     }
     return CMakeMake.extra_options(extra_vars)
Exemple #38
0
 def extra_options():
     extra_vars = {
         'double_precision': [False, "Build with double precision enabled (-DGMX_DOUBLE=ON)", CUSTOM],
         'mpisuffix': ['_mpi', "Suffix to append to MPI-enabled executables (only for GROMACS < 4.6)", CUSTOM],
         'mpiexec': ['mpirun', "MPI executable to use when running tests", CUSTOM],
         'mpiexec_numproc_flag': ['-np', "Flag to introduce the number of MPI tasks when running tests", CUSTOM],
         'mpi_numprocs': [0, "Number of MPI tasks to use when running tests", CUSTOM],
     }
     return CMakeMake.extra_options(extra_vars)
 def extra_options():
     """Add extra config options specific to Trilinos."""
     extra_vars = {
         'shared_libs': [False, "Build shared libs; if False, build static libs", CUSTOM],
         'openmp': [True, "Enable OpenMP support", CUSTOM],
         'all_exts': [True, "Enable all Trilinos packages", CUSTOM],
         'skip_exts': [[], "List of Trilinos packages to skip", CUSTOM],
         'verbose': [False, "Configure for verbose output", CUSTOM],
     }
     return CMakeMake.extra_options(extra_vars)
 def extra_options():
     """Add extra config options specific to Trilinos."""
     extra_vars = [
                   ('shared_libs', [False, "Build shared libs; if False, build static libs. (default: False).", CUSTOM]),
                   ('openmp', [True, "Enable OpenMP support (default: True)", CUSTOM]),
                   ('all_exts', [True, "Enable all Trilinos packages (default: True)", CUSTOM]),
                   ('skip_exts', [[], "List of Trilinos packages to skip (default: [])", CUSTOM]),
                   ('verbose', [False, 'Configure for verbose output (default: False)', CUSTOM])
                  ]
     return CMakeMake.extra_options(extra_vars)
Exemple #41
0
    def extra_options():
        extra_vars = [
            ('assertions', [True, "Enable assertions.  Helps to catch bugs in Clang.", CUSTOM]),
            ('build_targets', [["X86"], "Build targets for LLVM. Possible values: all, AArch64, ARM, CppBackend, Hexagon, " +
                               "Mips, MBlaze, MSP430, NVPTX, PowerPC, R600, Sparc, SystemZ, X86, XCore", CUSTOM]),
            ('bootstrap', [True, "Bootstrap Clang using GCC", CUSTOM]),
            ('usepolly', [False, "Build Clang with polly", CUSTOM]),
        ]

        return CMakeMake.extra_options(extra_vars)
    def extra_options():
        extra_vars = {
            'assertions': [True, "Enable assertions.  Helps to catch bugs in Clang.", CUSTOM],
            'build_targets': [["X86"], "Build targets for LLVM. Possible values: " + ', '.join(CLANG_TARGETS), CUSTOM],
            'bootstrap': [True, "Bootstrap Clang using GCC", CUSTOM],
            'usepolly': [False, "Build Clang with polly", CUSTOM],
            'static_analyzer': [True, "Install the static analyser of Clang", CUSTOM],
        }

        return CMakeMake.extra_options(extra_vars)
Exemple #43
0
    def extra_options():
        extra_vars = {
            'assertions': [True, "Enable assertions.  Helps to catch bugs in Clang.", CUSTOM],
            'build_targets': [["X86"], "Build targets for LLVM. Possible values: " + ', '.join(CLANG_TARGETS), CUSTOM],
            'bootstrap': [True, "Bootstrap Clang using GCC", CUSTOM],
            'usepolly': [False, "Build Clang with polly", CUSTOM],
            'static_analyzer': [True, "Install the static analyser of Clang", CUSTOM],
            # The sanitizer tests often fail on HPC systems due to the 'weird' environment.
            'skip_sanitizer_tests': [False, "Do not run the sanitizer tests", CUSTOM],
        }

        return CMakeMake.extra_options(extra_vars)
 def extra_options():
     """
     Define extra options needed by Geant4
     """
     extra_vars = {
         'G4ABLAVersion': [None, "G4ABLA version", CUSTOM],
         'G4NDLVersion': [None, "G4NDL version", CUSTOM],
         'G4EMLOWVersion': [None, "G4EMLOW version", CUSTOM],
         'PhotonEvaporationVersion': [None, "PhotonEvaporation version", CUSTOM],
         'G4RadioactiveDecayVersion': [None, "G4RadioactiveDecay version", CUSTOM],
     }
     return CMakeMake.extra_options(extra_vars)
    def configure_step(self):
        """Configure build: set config options and configure"""

        shlib_ext = get_shared_lib_ext()

        if LooseVersion(self.version) < LooseVersion("4.3"):
            self.cfg.update('configopts', "--enable-shared")

            if self.toolchain.options['pic']:
                self.cfg.update('configopts', '--with-pic')

            tup = (os.getenv('FFLAGS'), os.getenv('MPICC'), os.getenv('F90'))
            self.cfg.update('configopts', 'FCFLAGS="%s" CC="%s" FC="%s"' % tup)

            # add -DgFortran to CPPFLAGS when building with GCC
            if self.toolchain.comp_family() == toolchain.GCC:  #@UndefinedVariable
                self.cfg.update('configopts', 'CPPFLAGS="%s -DgFortran"' % os.getenv('CPPFLAGS'))

            ConfigureMake.configure_step(self)

        else:
            self.cfg.update('configopts', '-DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG " ')
            for (dep, libname) in [('cURL', 'curl'), ('HDF5', 'hdf5'), ('Szip', 'sz'), ('zlib', 'z')]:
                dep_root = get_software_root(dep)
                dep_libdir = get_software_libdir(dep)
                if dep_root:
                    incdir = os.path.join(dep_root, 'include')
                    self.cfg.update('configopts', '-D%s_INCLUDE_DIR=%s ' % (dep.upper(), incdir))
                    if dep == 'HDF5':
                        env.setvar('HDF5_ROOT', dep_root)
                        libhdf5 = os.path.join(dep_root, dep_libdir, 'libhdf5.%s' % shlib_ext)
                        self.cfg.update('configopts', '-DHDF5_LIB=%s ' % libhdf5)
                        libhdf5_hl = os.path.join(dep_root, dep_libdir, 'libhdf5_hl.%s' % shlib_ext)
                        self.cfg.update('configopts', '-DHDF5_HL_LIB=%s ' % libhdf5_hl)
                    else:
                        libso = os.path.join(dep_root, dep_libdir, 'lib%s.%s' % (libname, shlib_ext))
                        self.cfg.update('configopts', '-D%s_LIBRARY=%s ' % (dep.upper(), libso))

            CMakeMake.configure_step(self)
 def extra_options():
     extra_vars = {
         'with_python_bindings': [True, "Try to build Open Babel's Python bindings. (-DPYTHON_BINDINGS=ON)", CUSTOM],
     }
     return CMakeMake.extra_options(extra_vars)
Exemple #47
0
    def configure_step(self):
        """
        Configure build outside of source directory.
        """
        try:
            objdir = os.path.join(self.builddir, 'obj')
            os.makedirs(objdir)
            os.chdir(objdir)
        except OSError as err:
            raise EasyBuildError("Failed to prepare for configuration of PSI build: %s", err)

        env.setvar('F77FLAGS', os.getenv('F90FLAGS'))

        # In order to create new plugins with PSI, it needs to know the location of the source
        # and the obj dir after install. These env vars give that information to the configure script.
        self.psi_srcdir = os.path.basename(self.cfg['start_dir'].rstrip(os.sep))
        self.install_psi_objdir = os.path.join(self.installdir, 'obj')
        self.install_psi_srcdir = os.path.join(self.installdir, self.psi_srcdir)
        env.setvar('PSI_OBJ_INSTALL_DIR', self.install_psi_objdir)
        env.setvar('PSI_SRC_INSTALL_DIR', self.install_psi_srcdir)

        # explicitely specify Python binary to use
        pythonroot = get_software_root('Python')
        if not pythonroot:
            raise EasyBuildError("Python module not loaded.")

        # pre 4.0b5, they were using autotools, on newer it's CMake
        if LooseVersion(self.version) <= LooseVersion("4.0b5") and self.name == "PSI":
            # Use EB Boost
            boostroot = get_software_root('Boost')
            if not boostroot:
                raise EasyBuildError("Boost module not loaded.")

            self.log.info("Using configure based build")
            env.setvar('PYTHON', os.path.join(pythonroot, 'bin', 'python'))
            env.setvar('USE_SYSTEM_BOOST', 'TRUE')

            if self.toolchain.options.get('usempi', None):
                # PSI doesn't require a Fortran compiler itself, but may require it to link to BLAS/LAPACK correctly
                # we should always specify the sequential Fortran compiler,
                # to avoid problems with -lmpi vs -lmpi_mt during linking
                fcompvar = 'F77_SEQ'
            else:
                fcompvar = 'F77'

            # update configure options
            # using multi-threaded BLAS/LAPACK is important for performance,
            # cfr. http://sirius.chem.vt.edu/psi4manual/latest/installfile.html#sec-install-iii
            opt_vars = [
                ('cc', 'CC'),
                ('cxx', 'CXX'),
                ('fc', fcompvar),
                ('libdirs', 'LDFLAGS'),
                ('blas', 'LIBBLAS_MT'),
                ('lapack', 'LIBLAPACK_MT'),
            ]
            for (opt, var) in opt_vars:
                self.cfg.update('configopts', "--with-%s='%s'" % (opt, os.getenv(var)))

            # -DMPICH_IGNORE_CXX_SEEK dances around problem with order of stdio.h and mpi.h headers
            # both define SEEK_SET, this makes the one for MPI be ignored
            self.cfg.update('configopts', "--with-opt='%s -DMPICH_IGNORE_CXX_SEEK'" % os.getenv('CFLAGS'))

            # specify location of Boost
            self.cfg.update('configopts', "--with-boost=%s" % boostroot)

            # enable support for plugins
            self.cfg.update('configopts', "--with-plugins")

            ConfigureMake.configure_step(self, cmd_prefix=self.cfg['start_dir'])
        else:
            self.log.info("Using CMake based build")
            self.cfg.update('configopts', ' -DPYTHON_INTERPRETER=%s' % os.path.join(pythonroot, 'bin', 'python'))
            if self.name == 'PSI4' and LooseVersion(self.version) >= LooseVersion("1.2"):
                self.log.info("Remove the CMAKE_BUILD_TYPE test in PSI4 source and the downloaded dependencies!")
                self.log.info("Use PATCH_COMMAND in the corresponding CMakeLists.txt")
                self.cfg.update('configopts', ' -DCMAKE_BUILD_TYPE=EasyBuildRelease')
            else:
                self.cfg.update('configopts', ' -DCMAKE_BUILD_TYPE=Release')

            if self.toolchain.options.get('usempi', None):
                self.cfg.update('configopts', " -DENABLE_MPI=ON")

            if get_software_root('imkl'):
                self.cfg.update('configopts', " -DENABLE_CSR=ON -DBLAS_TYPE=MKL")

            if self.name == 'PSI4':
                pcmsolverroot = get_software_root('PCMSolver')
                if pcmsolverroot:
                    self.cfg.update('configopts', " -DENABLE_PCMSOLVER=ON")
                    if LooseVersion(self.version) < LooseVersion("1.2"):
                        self.cfg.update('configopts', " -DPCMSOLVER_ROOT=%s" % pcmsolverroot)
                    else:
                        self.cfg.update('configopts', " -DCMAKE_INSIST_FIND_PACKAGE_PCMSolver=ON "
                                        "-DPCMSolver_DIR=%s/share/cmake/PCMSolver" % pcmsolverroot)

                chempsroot = get_software_root('CheMPS2')
                if chempsroot:
                    self.cfg.update('configopts', " -DENABLE_CHEMPS2=ON")
                    if LooseVersion(self.version) < LooseVersion("1.2"):
                        self.cfg.update('configopts', " -DCHEMPS2_ROOT=%s" % chempsroot)
                    else:
                        self.cfg.update('configopts', " -DCMAKE_INSIST_FIND_PACKAGE_CheMPS2=ON "
                                        "-DCheMPS2_DIR=%s/share/cmake/CheMPS2" % chempsroot)

                #  Be aware, PSI4 wants exact versions of the following deps! built with CMake!!
                #  If you want to use non-CMake build versions, the you have to provide the
                #  corresponding Find<library-name>.cmake scripts
                #  In PSI4 version 1.2.1, you can check the corresponding CMakeLists.txt file
                #  in external/upstream/<library-name>/
                if LooseVersion(self.version) >= LooseVersion("1.2"):
                    for dep in ['libxc', 'Libint', 'pybind11', 'gau2grid']:
                        deproot = get_software_root(dep)
                        if deproot:
                            self.cfg.update('configopts', " -DCMAKE_INSIST_FIND_PACKAGE_%s=ON" % dep)
                            dep_dir = os.path.join(deproot, 'share', 'cmake', dep)
                            self.cfg.update('configopts', " -D%s_DIR=%s " % (dep, dep_dir))

            CMakeMake.configure_step(self, srcdir=self.cfg['start_dir'])
 def extra_options(extra_vars=None):
     """Easyconfig parameters specific to Python packages thar are configured/built/installed via CMake"""
     extra_vars = PythonPackage.extra_options(extra_vars=extra_vars)
     return CMakeMake.extra_options(extra_vars=extra_vars)
    def configure_step(self, *args, **kwargs):
        """Main configuration using cmake"""

        PythonPackage.configure_step(self, *args, **kwargs)

        return CMakeMake.configure_step(self, *args, **kwargs)
 def build_step(self, *args, **kwargs):
     """Build Python package with cmake"""
     return CMakeMake.build_step(self, *args, **kwargs)
 def install_step(self):
     """Install with cmake install"""
     return CMakeMake.install_step(self)
Exemple #52
0
 def extra_options():
     extra_vars = {
         'default_platform': ['openPBS', "Default cluster platform to set", CUSTOM],
     }
     return CMakeMake.extra_options(extra_vars)
 def build_step(self):
     """Custom build procedure for Eigen."""
     if LooseVersion(self.version) >= LooseVersion('3.3.4'):
         CMakeMake.build_step(self)
 def extra_options():
     """Custom easyconfig parameters specific to OpenCV."""
     extra_vars = {
         'cpu_dispatch': ['NONE', "Value to pass to -DCPU_DISPATCH configuration option", CUSTOM],
     }
     return CMakeMake.extra_options(extra_vars)