Date: Wed, 10 Jul 2019 16:19:23 +0200 From: Jan Beich <jbeich@FreeBSD.org> To: Yuri <yuri@rawbw.com> Cc: "ports\@freebsd.org" <ports@freebsd.org> Subject: Re: 12.0-RELEASE-p7 doesn't contain std::filesystem that has been added to 12.0-STABLE some time later Message-ID: <sgre-m0pg-wny@FreeBSD.org> In-Reply-To: <1eac89d9-babe-7069-8c4b-2fbe53234fcd@rawbw.com> (yuri@rawbw.com's message of "Mon, 8 Jul 2019 15:48:25 -0700") References: <1eac89d9-babe-7069-8c4b-2fbe53234fcd@rawbw.com>
index | next in thread | previous in thread | raw e-mail
Yuri <yuri@rawbw.com> writes:
> Maybe the patch level should be updated, because any port using
> std::filesystem fails in the current poudriere 12.0-RELEASE-p7 VM.
Which port? What error? std::filesystem can be used on any FreeBSD version.
C++ example:
#if __cplusplus >= 201703L && __has_include(<filesystem>)
#include <filesystem>
#else
#include <experimental/filesystem>
namespace std {
namespace filesystem = experimental::filesystem;
}
#endif
Makefile example:
.if exists(/usr/lib/libc++fs.a)
LIBS+= -lc++fs
.elif exists(/usr/lib/libc++experimental.a)
# XXX Remove after FreeBSD 12.0 EOL
LIBS+= -lc++experimental
.else
# XXX Remove after FreeBSD 11.2 EOL
USE_GCC= yes
LIBS+= -lstdc++fs
.endif
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?sgre-m0pg-wny>
