diff options
author | Axel Huebl <axel.huebl@plasma.ninja> | 2018-04-07 10:36:10 +0200 |
---|---|---|
committer | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2018-04-07 10:36:10 +0200 |
commit | 5c98b8bde5e7e584e94f97c90605b9e627f07772 (patch) | |
tree | 7360b59e4ed9893d8f089048fcaf448915abd3df /var | |
parent | 3bf863bb068536ff82a20201a83a6f7f56c7fd03 (diff) | |
download | spack-5c98b8bde5e7e584e94f97c90605b9e627f07772.tar.gz spack-5c98b8bde5e7e584e94f97c90605b9e627f07772.tar.bz2 spack-5c98b8bde5e7e584e94f97c90605b9e627f07772.tar.xz spack-5c98b8bde5e7e584e94f97c90605b9e627f07772.zip |
Catch2: make install (#7668)
Add a proper install variant for Catch(2).
This allows to use Catch2 downstram with `pkg-config` and
CMake's `find_package` commands via standard environment hints.
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/catch/package.py | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/catch/package.py b/var/spack/repos/builtin/packages/catch/package.py index 8ee1179261..fdb8c09bd9 100644 --- a/var/spack/repos/builtin/packages/catch/package.py +++ b/var/spack/repos/builtin/packages/catch/package.py @@ -25,12 +25,20 @@ from spack import * -class Catch(Package): +class Catch(CMakePackage): """Catch tests""" homepage = "https://github.com/catchorg/Catch2" url = "https://github.com/catchorg/Catch2/archive/v1.3.0.tar.gz" + variant('single_header', default=True, + description='Install a single header only.') + + # - "make install" was added in 1.7.0 + # - pkg-config package was added in 2.0.1 + # - CMake config package was added in 2.1.2 + conflicts('~single_header', when='@:1.6.1') + version('2.2.1', '54e56803c84890636bd7fe6c3856b104') version('2.1.0', '70b44068976d46d48f3cd8796f675691d3bc726b') version('2.0.1', '5c191a031edebd0525640ed2f38cbf64bacb1803') @@ -60,6 +68,15 @@ class Catch(Package): version('1.3.5', '2cfd78bce21368355c7d3880df88716084df2186') version('1.3.0', '24cd4e6518273fea20becd47a2e1edbee7ec209a') + @when('+single_header') + def cmake(self, spec, prefix): + pass + + @when('+single_header') + def build(self, spec, prefix): + pass + + @when('+single_header') def install(self, spec, prefix): mkdirp(prefix.include) install(join_path('single_include', 'catch.hpp'), prefix.include) |