How to prevent qmake from overriding my "QMAKE_CXXFLAGS+=-std=c++2a" option with c++1x? (macOS)
-
I cannot get my code (which needs c++2a) to compile on macOs because my option (QMAKE_CXXFLAGS+=-std=c++2a) gets overridden with -std=c++11 (or some other standard if CONFIG+=c++1x is used). The problem is that qmake appends whatever -std option it assumes AFTER my option, which overrides it. Which variable do I need to edit in my .pro file to remove the flag enforced by qmake?
Editing mkspecs or other files from Qt distribution is not a solution, I need this to work on CI build servers like Travis.
-
Hi,
Why not use
CONFIG += c++2a
in your .pro file ? -
@SGaist said in How to prevent qmake from overriding my "QMAKE_CXXFLAGS+=-std=c++2a" option with c++1x? (macOS):
CONFIG += c++2a
Wow, that worked. Somehow I thought Qt 5.14 doesn't support c++2a yet. Sorry, and thanks!