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.1.0.tar.gz" sha256 "a7dfed9add408195e0aed617ba5aaefe9f701080eb49f66ef6e2308736250f6e" bottle do cellar :any_skip_relocation sha256 "1132f2aefaa703caf2ba477f3e45ae0c3a63c1ac3a5fc11eeba38553c94545a5" => :mojave sha256 "4600e692dcf447175726ea9004333d02c76579ea07866f53e5852c36648b9b9c" => :high_sierra sha256 "4600e692dcf447175726ea9004333d02c76579ea07866f53e5852c36648b9b9c" => :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