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.2.5.tar.gz" sha256 "15ddcb3e61352d905b6a0179a2e88bf3b892e0bc724e23d5e0591449239dc891" bottle do cellar :any_skip_relocation sha256 "030dd275d7b0ff77a8eefeffb947f805d753a6dd25152c98a0b37a7f463ce1b5" => :mojave sha256 "030dd275d7b0ff77a8eefeffb947f805d753a6dd25152c98a0b37a7f463ce1b5" => :high_sierra sha256 "74e65077d89c107d9b5f0d9de6b177eef23ce63274c5899d0015bbf4dffd3ff8" => :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