Vijay
Vijay

Reputation: 2067

qt qmake -set environment variables

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.

Upvotes: 1

Views: 4749

Answers (1)

jwernerny
jwernerny

Reputation: 7048

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

Upvotes: 2

Related Questions