QMake: How do I change a compiler option which is already given a value by the framework
-
Thank you for all the suggestions :-) - unfortunately none of them seems to do the trick. Except possibly the option of including mkspec in the repo. Can I tell Qt to look in an alternative place (the repo) for the mkspec?
-
Yes, qmake -spec accepts absolute paths. I have not tried relative ones, but it's worth a try.
-
Ok, this would be a workable solution. Thanks. Still a bit frustrating that there is no way to simply override the option.
-
doesn't work
-
I'm using qt 4.8.3. If I run your test.pro I get:
Project MESSAGE: -pipe
Project MESSAGE: -pipeThe reason seems to be that the flags are added after the pro file is processed. (Which is also why manipulating QMAKE_CXXFLAGS doesn't work.)
It is interesting that you have a different (and much more desireable) behaviour. What Qt version are you running?
-
I'm using Qt 5. Unfortunately I have no access to a Mac right now to test.
In a next step you could <code>qmake -d</code> to see where the flag actually comes from; it should have been already set when processing the <code>.pro</code> file (and thus beeing removable).
-
Ok, qmake -d shows that tge macx-g++ spec sets it to QMAKE_CXXFLAGS_X86_64. Changing this variable in the pro file actually works. I cannot get rid of the -mmacosx-version-min=10.5 from the spec, but now my setting -mmacosx-version-min=10.6 appears last and gets effect.
Thanks.