Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qmake: using complex conglomerate option
Forum Updated to NodeBB v4.3 + New Features

Qmake: using complex conglomerate option

Scheduled Pinned Locked Moved Qt Creator and other tools
5 Posts 2 Posters 1.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    alexqt143
    wrote on last edited by
    #1

    Hi all,

    when compiling against llvm libs from command line (linux) using g++, I use:
    @g++ myfile.cpp llvm-config --cxxflags --ldflags --libs all --system-libs -std=c++11 -ldl -lpthread@

    Switching to QtCreator and qmake, I know I can add e.g.
    @QMAKE_CXXFLAGS += -std=c++11@
    to the .pro file

    But how could I add the llvm-config .... thing, which actually calls installed llvm-config to unfold to a large bunch of flags, includes and linked libs etc,?

    Ok, I could execute the command and then copy the result to all the different, appropriate qmake variables (INCLUDEPATH, QMAKE_CXXFLAGS ). This is laborious and needs reworking every time llvm-config options change.

    Any ideas?

    Alex
    @@

    1 Reply Last reply
    0
    • A Offline
      A Offline
      alexqt143
      wrote on last edited by
      #2

      No one?
      In the mean time I had gone the hard way and copied all instructions; Code compiles, runs and can be debugged.

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        Please don't bump your own thread in such a short time. Allow 24 to 48 hours for people to see and respond to your thread. Not all members of this forum are in the same time zone as you.

        Back to your question, something like:

        @
        QMAKE_CXXFLAGS += $$system('llvm-config --cxxflags')
        @

        should do the trick. You can repeat it for the other flags in the appropriate variable.

        On a side note, c++11 can be activated through

        @CONFIG += c++11@

        Hope it helps

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • A Offline
          A Offline
          alexqt143
          wrote on last edited by
          #4

          Oh,
          i didn't mean to bump. I just wanted to inform that going the long way works out. I should have done this as edit...

          Your suggestions work, thank you!

          As a side note: code completion for llvm 3.6 (using lots of std::unique_ptr stuff) works using the clang code model. The default c++ code model has a bug related (https://bugreports.qt.io/browse/QTCREATORBUG-8937).

          Now coding can start. Thanks to the Qt team for the great tools!
          Alex

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            You're welcome !

            Since you have your project running, please update the thread title prepending [solved] so other forum users may know a solution has been found :)

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved