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.1.tar.gz" sha256 "ea501f848bf78c1c001c204feba44a09ddd086bff00cc2fe4dbc414922c2445b" bottle do cellar :any_skip_relocation sha256 "ba619c61840f7298cdc9647b77eea40025cfb47170d9aa2b20839c311e0a2b65" => :mojave sha256 "ba619c61840f7298cdc9647b77eea40025cfb47170d9aa2b20839c311e0a2b65" => :high_sierra sha256 "3c1d4e673578245d596918c07c534f132368ab2e9694b5fca0f8a5c459d55543" => :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