# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           github 1.0
PortGroup           cmake 1.0

github.setup        google highway 1.2.0
categories          devel
maintainers         {jmr @jmroot}
license             {Apache-2 BSD}

description         portable SIMD/vector intrinsics

long_description    Highway is a C++ library that provides portable \
                    SIMD/vector intrinsics.

github.tarball_from releases
checksums           rmd160 91e88d0fcea6f882ef37c3c3c532600ec68c2ad8 \
                    sha256 58e9d5d41d6573ad15245ad76aec53a69499ca7480c092d899c4424812ed906f

patchfiles          disable-sve.patch

cmake.out_of_source yes
configure.args-append \
                    -DBUILD_SHARED_LIBS=ON \
                    -DBUILD_TESTING=OFF

compiler.cxx_standard   2011
# Compilation warning: "x86 Clang <= 6: define HWY_COMPILE_ONLY_SCALAR or upgrade."
# (Xcode Clang 10.0.1 ~= llvm.org Clang 7.0)
compiler.blacklist  {clang < 1001}

variant tests description {Enable building of test code} {
    depends_build-append    port:gtest
    configure.args-replace  -DBUILD_TESTING=OFF \
                            -DBUILD_TESTING=ON
    configure.args-append   -DHWY_SYSTEM_GTEST=ON
    test.run        yes
}
