Reputation: 19771
I've configured my locally installed version of clang 5.
and set up a kit with it
but when I do a build with it:
it's clearly still using the system compiler for qmake, which causes a bunch of errors because my code requires C++17 support:
How do I set what compiler qmake is using?
Thank you.
Upvotes: 1
Views: 2764
Reputation: 10067
You can do it in your pro file, directly:
QMAKE_CC = /path/to/the/c/compiler
QMAKE_CXX = /path/to/the/c++/compiler
but you'd be better specify the correct Qt mkspec in your kit, which could be something like linux-clang. Check the mkspecs directory, see if in some of its subdirectories there is the right qmake.conf already, if not you can make a new subdirectory in mkspecs and a new configuration file inside it. The mkspecs directory should be in the path given by the terminal command
qmake -query QT_INSTALL_ARCHDATA
Hope it helped.
Upvotes: 4