# -*- 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.4.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 e36d39a5d799a86d783519adacadbbfb80a5416a \
                    sha256 36f672ab48ddb3c8555e9e89e16fe400cd7d16c6eb455a1a3d0c146a63ababdc

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

compiler.cxx_standard   2014
# 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
}
