KcFnMi
KcFnMi

Reputation: 6181

How to pass compiler argument with make?

With

QMAKE_CXXFLAGS += -W4

I'm trying to pass W4 to the compiler (Microsoft compiler of VS2019).

However, someway, Qt Creator is passing W3 afterwards and my W4 is overwritten. In the compile output panel I see something like:

cl -many -other parameters -W4 -and -more -W3 -and -others 

How to deal with this?

Upvotes: 0

Views: 398

Answers (1)

3CxEZiVlQ
3CxEZiVlQ

Reputation: 38991

QMAKE_CXXFLAGS_WARN_ON instead of QMAKE_CXXFLAGS sets the compiler warnings.

Upvotes: 1

Related Questions