1

As per documentation here http://qt-project.org/doc/qt-4.8/qmake-environment-reference.html

I am trying to set QMAKE_CXXFLAGS and QMAKE_CXXFLAGS_DEBUG variables.

Basically I want to dynamically add some compiler flags to generated make file. e.g. -ggdb OR -j depending upon requirement. I do not want to make it permanently in .pro files.

I am setting using -set. when I again use -query, i am unable to see that variable.

Please let me know if i am missing something.

I want to dynamically generate debug builds and release builds or use -j flags. Which should be applicable to all the qmake commands i issue after setting environment variable.

1 Answer 1

2

I don't believe QMAKE_CXXFLAGS and QMAKE_CXXFLAGS_DEBUG are settable using the qmake -set. That command is only for "persistent properties." qmake -query should give you a list of ones you can change.

That said, you can manually set the values when you invoke qmake by using the same line(s) you would in a .pro file.

qmake "QMAKE_CXXFLAGS+=-j" "QMAKE_CXXFLAGS_DEBUG+=-ggdb" mystuff.pro 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.