Added customization for make targets in 'build' and 'install' phases for CMakePackage (#2742)

* Added customization for make targets in 'build' and 'install' phases for CMakePackage

* Use rst in build system docs so that Sphinx generates nice API docs

* Allow AutotoolsPackages to be built in a different directory

* Flake8

* Fix missing import

* Allow configure to be located in different directory

* Update espressopp to use build targets

* Flake8

* Sphinx fix, lists must be a new paragraph

* Back out change that allowed a configure script in a different directory than build_directory

* Add missing deps, build in parallel

* Missing space for rst list
This commit is contained in:
Adam J. Stewart
2017-01-15 18:23:16 -06:00
committed by Todd Gamblin
parent 4b7b595e3c
commit f480e3449e
8 changed files with 95 additions and 77 deletions

View File

@@ -36,7 +36,7 @@ class Espressopp(CMakePackage):
url = "https://github.com/espressopp/espressopp/tarball/v1.9.4.1"
version('develop', git='https://github.com/espressopp/espressopp.git', branch='master')
version('1.9.4.1', '0da74a6d4e1bfa6a2a24fca354245a4f')
version('1.9.4.1', '0da74a6d4e1bfa6a2a24fca354245a4f')
version('1.9.4', 'f2a27993a83547ad014335006eea74ea')
variant('debug', default=False, description='Build debug version')
@@ -54,20 +54,23 @@ class Espressopp(CMakePackage):
depends_on("fftw")
depends_on("py-sphinx", when="+ug", type='build')
depends_on("py-sphinx", when="+pdf", type='build')
depends_on('py-numpy', when="+ug", type='build')
depends_on('py-numpy', when="+pdf", type='build')
depends_on('py-matplotlib', when="+ug", type='build')
depends_on('py-matplotlib', when="+pdf", type='build')
depends_on("texlive", when="+pdf", type='build')
depends_on("doxygen", when="+dg", type='build')
def cmake_args(self):
def build_type(self):
spec = self.spec
options = []
options.extend(['-DEXTERNAL_MPI4PY=ON', '-DEXTERNAL_BOOST=ON'])
if '+debug' in spec:
options.extend(['-DCMAKE_BUILD_TYPE:STRING=Debug'])
return 'Debug'
else:
options.extend(['-DCMAKE_BUILD_TYPE:STRING=Release'])
return options
return 'Release'
def cmake_args(self):
return ['-DEXTERNAL_MPI4PY=ON', '-DEXTERNAL_BOOST=ON']
def build(self, spec, prefix):
with working_dir(self.build_directory()):
make()