# -*- 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           cmake 1.1
PortGroup           github 1.0

name                gslpp
github.setup        microsoft GSL 4.2.1 v
revision            0
categories          devel
license             MIT
maintainers         {@barracuda156 macos-powerpc.org:barracuda} openmaintainer
description         GSL: Guidelines Support Library
long_description    {*}${description}
checksums           rmd160  5a6d5330e7074fe2030937e9a34ca140bc667af3 \
                    sha256  d959f1cb8bbb9c94f033ae5db60eaf5f416be1baa744493c32585adca066fe1f \
                    size    62226
github.tarball_from archive

# gtest needs at least C++17:
post-patch {
    reinplace "s,cxx_std_14,cxx_std_17," ${worksrcpath}/CMakeLists.txt
}

# Needed if building tests:
depends_build-append \
                    port:gtest \
                    path:bin/pkg-config:pkgconfig

compiler.cxx_standard   2017

configure.args-append \
                    -DGSL_INSTALL=ON \
                    -DGSL_TEST=ON

test.run            yes
