From 0c1496896d446a95369c373caf9c0b709060e2bc Mon Sep 17 00:00:00 2001 From: Chris Green Date: Fri, 2 Aug 2019 19:19:39 -0500 Subject: Resolves #11487. (#12136) * Incorporate as a patch upstream commit https://github.com/ericniebler/range-v3/commit/0c20dbf05973368339aeae0c4e106560e2dcf76b#diff-acb9169b4ccbac494ced5140d285a015 resolving problems with `-Wno-...` options not being understood by GCC. * Incorporate as a patch upstream PR https://github.com/ericniebler/range-v3/pull/1202 fixing upstream issue https://github.com/ericniebler/range-v3/issues/1196. * Compile tests only if we actually want to run them. * Optionally compile documentation with a `+doc` variant. * Add `+examples` and `+perf` variants to avoid unnecessary compilation of components usually not required for install. * Add conditional build-only dependency on Boost when appropriate. * Install docs, examples and performance tests if built (not part of upstream build instructions). * Add @chissg as a maintainer. --- .../builtin/packages/range-v3/fix-is_trivial.patch | 96 ++++++++++++++++ .../packages/range-v3/gcc-compile-opt-check.patch | 43 +++++++ .../repos/builtin/packages/range-v3/package.py | 123 ++++++++++++++++++++- 3 files changed, 260 insertions(+), 2 deletions(-) create mode 100644 var/spack/repos/builtin/packages/range-v3/fix-is_trivial.patch create mode 100644 var/spack/repos/builtin/packages/range-v3/gcc-compile-opt-check.patch (limited to 'var') diff --git a/var/spack/repos/builtin/packages/range-v3/fix-is_trivial.patch b/var/spack/repos/builtin/packages/range-v3/fix-is_trivial.patch new file mode 100644 index 0000000000..e719285a87 --- /dev/null +++ b/var/spack/repos/builtin/packages/range-v3/fix-is_trivial.patch @@ -0,0 +1,96 @@ +diff --git a/include/meta/meta_fwd.hpp b/include/meta/meta_fwd.hpp +index edfb9068..ac041999 100644 +--- a/include/meta/meta_fwd.hpp ++++ b/include/meta/meta_fwd.hpp +@@ -152,6 +152,13 @@ + #define META_TYPE_CONSTRAINT(...) typename + #endif + ++#if (defined(__cpp_lib_type_trait_variable_templates) && \ ++ __cpp_lib_type_trait_variable_templates > 0) ++#define META_CXX_TRAIT_VARIABLE_TEMPLATES 1 ++#else ++#define META_CXX_TRAIT_VARIABLE_TEMPLATES 0 ++#endif ++ + namespace meta + { + #if META_CXX_INTEGER_SEQUENCE +@@ -208,8 +215,10 @@ namespace meta + META_CONCEPT_BARRIER(__is_same(T, U)); + #elif defined(__GNUC__) && __GNUC__ >= 6 + META_CONCEPT_BARRIER(__is_same_as(T, U)); +-#else ++#elif defined(META_CXX_TRAIT_VARIABLE_TEMPLATES) + META_CONCEPT_BARRIER(std::is_same_v); ++#else ++ META_CONCEPT_BARRIER(std::is_same::value); + #endif + + template