diff options
author | Kelly (KT) Thompson <kgt@lanl.gov> | 2016-03-01 15:25:57 -0700 |
---|---|---|
committer | Kelly (KT) Thompson <kgt@lanl.gov> | 2016-03-01 15:25:57 -0700 |
commit | 8174489787c56cee1726ca36799c236e4869f471 (patch) | |
tree | 1fa0c86576c1ca4fabc5777944a52bdebfad9d7d | |
parent | 21181075b40367b3fa9891c51930c7aedcfab4bf (diff) | |
download | spack-8174489787c56cee1726ca36799c236e4869f471.tar.gz spack-8174489787c56cee1726ca36799c236e4869f471.tar.bz2 spack-8174489787c56cee1726ca36799c236e4869f471.tar.xz spack-8174489787c56cee1726ca36799c236e4869f471.zip |
+ Provide two new variants for cmake:
1) +qt - build the cmake-gui Qt application.
- adds a dependency on Qt.
2) +sphinxbuild - build the html CMake documentation.
- adds a dependency on python and py-sphinx
-rw-r--r-- | var/spack/repos/builtin/packages/cmake/package.py | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py index e20c1e4aeb..f39a681284 100644 --- a/var/spack/repos/builtin/packages/cmake/package.py +++ b/var/spack/repos/builtin/packages/cmake/package.py @@ -37,16 +37,34 @@ class Cmake(Package): version('2.8.10.2', '097278785da7182ec0aea8769d06860c') variant('ncurses', default=True, description='Enables the build of the ncurses gui') + variant('qt', default=False, description='Enables the build of cmake-gui') + variant('sphinxbuild', default=False, description='Enables the generation of html and man page documentation') + depends_on('ncurses', when='+ncurses') + depends_on('qt', when='+qt') + depends_on('python@2.7.11:', when='+sphinxbuild') + depends_on('py-sphinx', when='+sphinxbuild') def url_for_version(self, version): """Handle CMake's version-based custom URLs.""" return 'https://cmake.org/files/v%s/cmake-%s.tar.gz' % (version.up_to(2), version) - def install(self, spec, prefix): - configure('--prefix=' + prefix, - '--parallel=' + str(make_jobs), - '--', '-DCMAKE_USE_OPENSSL=ON') + + options = ['--prefix=%s' % prefix] + options.append('--parallel=%s' % str(make_jobs)) + + if '+qt' in spec: + options.append('--qt-gui') + + if '+sphinxbuild' in spec: + options.append('--sphinx-html') + options.append('--sphinx-man') + + options.append('--') + options.append('-DCMAKE_USE_OPENSSL=ON') + + configure(*options) + make() make('install') |