cmacq2 (Johan Ouwerkerk) noted that cxxflags seems not to work on autotools-based build system. It should but that might also have been an issue actually getting the flag to reflect.
Example would be the libgpg-error and gpgme modules, which he's been trying to use.
See also his kdesrc-build Docker thing at https://gitlab.com/cmacq2/kdesrc-docker/tree/master (I haven't been able to get this work myself because the Debian sid-slim host seems to fail in dpkg due to hardlink issues on the overlay filesystem????)