Fix Catch2 Single Header (#10022)

Fix the install of the single header amalgate in catch2.

The public API for catch < 2.3.0 was "#include <catch.hpp>".
For 2.3.0+ it is "#include <catch2/catch.hpp>"
This commit is contained in:
Axel Huebl 2018-12-08 03:13:40 +01:00 committed by Peter Scheibel
parent 1650e9c0b2
commit 892ae2043f

View File

@ -63,6 +63,9 @@ def build(self, spec, prefix):
@when('+single_header')
def install(self, spec, prefix):
mkdirp(prefix.include)
install(join_path('single_include', 'catch.hpp'), prefix.include)
if spec.satisfies('@2.3.0:'):
install_tree('single_include', prefix.include)
else:
install(join_path('single_include', 'catch.hpp'), prefix.include)
# fakes out spack so it installs a module file
mkdirp(join_path(prefix, 'bin'))