This issue is related to Adaptor Grammar compilation error on MacOS using the Apple Clang compiler.
A dirty solution for now is to use the GCC compiler instead. Indeed the ext/stdio_filebuf.h is a non-standard C header bundled with GCC, but not with Clang. On Mac it can be installed (gcc-7.1) from http://hpc.sourceforge.net.
Once done, in the cmake output you should have
-- The C compiler identification is GNU someversion
-- The CXX compiler identification is GNU someversion
instead of
-- The C compiler identification is AppleClang someversion
-- The CXX compiler identification is AppleClang someversion
I'm working on a portable solution based on boost::iostreams instead.