diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2016-01-13 08:25:58 -0800 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2016-01-13 08:25:58 -0800 |
commit | 7fe5eaf6b73e9141d59778b4ddbe2460effbf345 (patch) | |
tree | 8e79e19ba2a80d6cf79ee2ad22a90194bb923439 | |
parent | 37f1337a0b29f142a1144e308b223a450b5ae8a4 (diff) | |
parent | aa1f96c73b0839f560f97b4814959c35be1ac056 (diff) | |
download | spack-7fe5eaf6b73e9141d59778b4ddbe2460effbf345.tar.gz spack-7fe5eaf6b73e9141d59778b4ddbe2460effbf345.tar.bz2 spack-7fe5eaf6b73e9141d59778b4ddbe2460effbf345.tar.xz spack-7fe5eaf6b73e9141d59778b4ddbe2460effbf345.zip |
Merge pull request #348 from eschnett/eschnett/cereal
New package "cereal"
-rw-r--r-- | var/spack/packages/cereal/Werror.patch | 33 | ||||
-rw-r--r-- | var/spack/packages/cereal/package.py | 34 |
2 files changed, 67 insertions, 0 deletions
diff --git a/var/spack/packages/cereal/Werror.patch b/var/spack/packages/cereal/Werror.patch new file mode 100644 index 0000000000..d39eaaffdb --- /dev/null +++ b/var/spack/packages/cereal/Werror.patch @@ -0,0 +1,33 @@ +--- old/sandbox/CMakeLists.txt ++++ new/sandbox/CMakeLists.txt +@@ -4,9 +4,11 @@ + add_executable(sandbox_json sandbox_json.cpp) + add_executable(sandbox_rtti sandbox_rtti.cpp) + ++if(Boost_FOUND) + add_executable(sandbox_vs sandbox_vs.cpp) + target_link_libraries(sandbox_vs sandbox_vs_dll) + include_directories(sandbox_shared_lib) ++endif(Boost_FOUND) + + if(Boost_FOUND) + add_executable(performance performance.cpp) +--- old/include/cereal/types/common.hpp ++++ new/include/cereal/types/common.hpp +@@ -106,14 +106,16 @@ + t = reinterpret_cast<typename common_detail::is_enum<T>::type const &>( value ); + } + ++#ifndef CEREAL_ENABLE_RAW_POINTER_SERIALIZATION + //! Serialization for raw pointers + /*! This exists only to throw a static_assert to let users know we don't support raw pointers. */ + template <class Archive, class T> inline + void CEREAL_SERIALIZE_FUNCTION_NAME( Archive &, T * & ) + { + static_assert(cereal::traits::detail::delay_static_assert<T>::value, + "Cereal does not support serializing raw pointers - please use a smart pointer"); + } ++#endif + + //! Serialization for C style arrays + template <class Archive, class T> inline diff --git a/var/spack/packages/cereal/package.py b/var/spack/packages/cereal/package.py new file mode 100644 index 0000000000..a83927456f --- /dev/null +++ b/var/spack/packages/cereal/package.py @@ -0,0 +1,34 @@ +from spack import * +import shutil + +class Cereal(Package): + """cereal is a header-only C++11 serialization library. cereal takes arbitrary data types and reversibly turns them into different representations, such as compact binary encodings, XML, or JSON. cereal was designed to be fast, light-weight, and easy to extend - it has no external dependencies and can be easily bundled with other code or used standalone.""" + homepage = "http://uscilab.github.io/cereal/" + url = "https://github.com/USCiLab/cereal/archive/v1.1.2.tar.gz" + + version('1.1.2', '34d4ad174acbff005c36d4d10e48cbb9') + version('1.1.1', '0ceff308c38f37d5b5f6df3927451c27') + version('1.1.0', '9f2d5f72e935c54f4c6d23e954ce699f') + version('1.0.0', 'd1bacca70a95cec0ddbff68b0871296b') + version('0.9.1', '8872d4444ff274ce6cd1ed364d0fc0ad') + + patch("Werror.patch") + + depends_on("cmake @2.6.2:") + + def install(self, spec, prefix): + # Don't use -Werror + filter_file(r'-Werror', '', 'CMakeLists.txt') + + # configure + # Boost is only used for self-tests, which we are not running (yet?) + cmake('.', '-DCMAKE_DISABLE_FIND_PACKAGE_Boost=TRUE', *std_cmake_args) + + # Build + make() + + # Install + shutil.rmtree(join_path(prefix, 'doc'), ignore_errors=True) + shutil.rmtree(join_path(prefix, 'include'), ignore_errors=True) + shutil.copytree('doc', join_path(prefix, 'doc'), symlinks=True) + shutil.copytree('include', join_path(prefix, 'include'), symlinks=True) |