SOLVED: Detecting compiler version in *.pro file
how can I make a condition in a Qt project file based on the compiler version (e.g. for minGW)?
Something similar to :
greaterThan(QT_MAJOR_VERSION,4): QT += widgets
but for the compiler, e.g.:
greaterThan(G++_VERSION,4.7): DEFINES += something
I am not aware of something like that being available. What you could do is parse the output of g++ --version (invoked with system) and then set your variables based on that.
Hope it helps
Thanks again for your help!
You're welcome !
If this answers you question, please update the thread's title to solved so other forum users may know that a solution has been found :)