class Xsimd < Formula desc "Modern, portable C++ wrappers for SIMD intrinsics" homepage "https://xsimd.readthedocs.io/en/latest/" url "https://github.com/QuantStack/xsimd/archive/7.3.0.tar.gz" sha256 "208b09d9056593460b2f87c5ad20f3d9e000b6306995c7672ea23c1b4a2fd616" bottle do cellar :any_skip_relocation sha256 "9136e36828157d1331fc1bcb45e420b6edb288fe01f3805ce0017c0ff6e53616" => :mojave sha256 "9136e36828157d1331fc1bcb45e420b6edb288fe01f3805ce0017c0ff6e53616" => :high_sierra sha256 "947192d693d59d60c162f0d88eb19a9cf9493beb024cf9e553586b7c525c107a" => :sierra end depends_on "cmake" => :build def install args = std_cmake_args args << "-DBUILD_TESTS=OFF" system "cmake", ".", *args system "make", "install" end test do (testpath/"test.c").write <<~EOS #include #include #include "xsimd/memory/xsimd_alignment.hpp" using namespace xsimd; struct mock_container {}; int main(void) { using u_vector_type = std::vector; using a_vector_type = std::vector>; using u_vector_align = container_alignment_t; using a_vector_align = container_alignment_t; using mock_align = container_alignment_t; if(!std::is_same::value) abort(); if(!std::is_same::value) abort(); if(!std::is_same::value) abort(); return 0; } EOS system ENV.cxx, "test.c", "-std=c++14", "-I#{include}", "-o", "test" system "./test" end end