Howto get information about current version of GCC from .pro-file, Qt

Here is simple trick to get information about currently used GCC compiler from .pro-file of Qt project:

\# Show version of GCC compiler
GCC_VER = $$system(g++ --version)
message(Current GCC version: $$GCC_VERSION)

Do not forget to write it in unix:!macx { section.


Another useful info about Linux machine could be obtained by next command:

\# Show general information about current Linux system
SYSTEM_INFO = $$system(uname -a && cat /etc/issue)
message(System info: $$SYSTEM_INFO)
Last updated:
Categories: TIP
comments powered by Disqus