# -*- 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

github.setup        ConorWilliams libfork 3.8.0 v
revision            0
categories          devel parallel
license             MPL-2
maintainers         nomaintainer
description         coroutine-tasking library
long_description    A bleeding-edge, lock-free, wait-free, continuation-stealing {*}${description}.
checksums           rmd160  cfab472909d581087b3154583609268aa288a6dc \
                    sha256  53f23f0d27bb0753c0b03132f3c17bf8099617f037a2389a04e85fdd6f2736e8 \
                    size    332003
github.tarball_from archive
# Do not set to noarch.

depends_build-append \
                    port:catch2

compiler.cxx_standard   2023

configure.args-append \
                    -DBUILD_BENCHMARKS=0 \
                    -DBUILD_COVERAGE=0 \
                    -DBUILD_DOCS=0 \
                    -DBUILD_TESTING=1 \
                    -DLF_NO_HWLOC=1

# https://github.com/ConorWilliams/libfork/issues/43
configure.args-append \
                    -Dlibfork_DEV_MODE=1

if {[string match *gcc* ${configure.compiler}] && ${configure.build_arch} in [list arm i386 ppc]} {
    configure.ldflags-append \
                    -latomic
}

depends_test-append port:catch2

# On ppc: 100% tests passed, 0 tests failed out of 136
test.run            yes
