diff options
Diffstat (limited to 'var/spack/repos/builtin/packages/paradiseo/package.py')
-rw-r--r-- | var/spack/repos/builtin/packages/paradiseo/package.py | 36 |
1 files changed, 10 insertions, 26 deletions
diff --git a/var/spack/repos/builtin/packages/paradiseo/package.py b/var/spack/repos/builtin/packages/paradiseo/package.py index c91b01c964..036d7cdb4f 100644 --- a/var/spack/repos/builtin/packages/paradiseo/package.py +++ b/var/spack/repos/builtin/packages/paradiseo/package.py @@ -1,13 +1,13 @@ ############################################################################## -# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-647188 # -# For details, see https://github.com/llnl/spack -# Please also see the LICENSE file for our notice and the LGPL. +# For details, see https://github.com/spack/spack +# Please also see the NOTICE and LICENSE files for our notice and the LGPL. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License (as @@ -25,7 +25,7 @@ from spack import * -class Paradiseo(Package): +class Paradiseo(CMakePackage): """A C++ white-box object-oriented framework dedicated to the reusable design of metaheuristics.""" homepage = "http://paradiseo.gforge.inria.fr/" @@ -50,15 +50,12 @@ class Paradiseo(Package): variant('edo', default=True, description='Compile with (Experimental) EDO module') - # variant('tests', default=False, description='Compile with build tests') # variant('doc', default=False, description='Compile with documentation') - variant('debug', default=False, - description='Builds a debug version of the libraries') variant('openmp', default=False, description='Enable OpenMP support') variant('gnuplot', default=False, description='Enable GnuPlot support') # Required dependencies - depends_on("cmake", type='build') + depends_on("cmake@2.8:", type='build') # Optional dependencies depends_on("mpi", when="+mpi") @@ -74,32 +71,19 @@ class Paradiseo(Package): patch('fix_tests.patch') patch('fix_tutorials.patch') - def install(self, spec, prefix): - options = [] - options.extend(std_cmake_args) + def cmake_args(self): + spec = self.spec - options.extend([ - '-DCMAKE_BUILD_TYPE:STRING=%s' % ( - 'Debug' if '+debug' in spec else 'Release'), + return [ '-DINSTALL_TYPE:STRING=MIN', '-DMPI:BOOL=%s' % ('TRUE' if '+mpi' in spec else 'FALSE'), # Note: This requires a C++11 compatible compiler '-DSMP:BOOL=%s' % ('TRUE' if '+smp' in spec else 'FALSE'), '-DEDO:BOOL=%s' % ('TRUE' if '+edo' in spec else 'FALSE'), '-DENABLE_CMAKE_TESTING:BOOL=%s' % ( - 'TRUE' if '+tests' in spec else 'FALSE'), + 'TRUE' if self.run_tests else 'FALSE'), '-DENABLE_OPENMP:BOOL=%s' % ( 'TRUE' if '+openmp' in spec else 'FALSE'), '-DENABLE_GNUPLOT:BOOL=%s' % ( 'TRUE' if '+gnuplot' in spec else 'FALSE') - ]) - - with working_dir('spack-build', create=True): - # Configure - cmake('..', *options) - - # Build, test and install - make("VERBOSE=1") - if '+tests' in spec: - make("test") - make("install") + ] |