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/6.1.6.tar.gz" sha256 "949139130fce7fc357f7671a6c5e83fc0daa0ab302529c53e416fcf7c372d258" bottle do cellar :any_skip_relocation sha256 "a24ffc89649331370da9175f0cbbc0a7994ab6c9719a14c417b823e9c71606dd" => :mojave sha256 "ec4ea29cee3b00e25067916fbbd54bec16e07a8a5fc5ff25ccfb4745b587575d" => :high_sierra sha256 "ec4ea29cee3b00e25067916fbbd54bec16e07a8a5fc5ff25ccfb4745b587575d" => :sierra sha256 "ec4ea29cee3b00e25067916fbbd54bec16e07a8a5fc5ff25ccfb4745b587575d" => :el_capitan 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