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. QtCreator Clang Code Model with compile_commands.json
QtWS25 Last Chance

QtCreator Clang Code Model with compile_commands.json

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
4 Posts 2 Posters 3.3k Views
  • 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.
  • B Offline
    B Offline
    bbennetts
    wrote on last edited by
    #1

    Hi,

    The clang code model in QTC works pretty well for me, however the project I work on has many differing compile lines for groups of translation units using a bespoke makefile system (i.e. not cmake/qmake based). Is it possible to provide a compile_commands.json so that the clang tool can match the actual compilation?

    Thanks, Bryan.

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

      Hi,

      Do you mean you would like to start a new tool for Qt Creator to handle bespoke ? Or just run it ? There's some explanation there.

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

      B 1 Reply Last reply
      1
      • SGaistS SGaist

        Hi,

        Do you mean you would like to start a new tool for Qt Creator to handle bespoke ? Or just run it ? There's some explanation there.

        B Offline
        B Offline
        bbennetts
        wrote on last edited by
        #3

        Hi @SGaist,

        Thanks for the reply.

        I mean I have a monolithic project with a custom Makefile based build system with (at least) 13k source files, I can edit/build/run/debug this project fine in QTC (which other IDEs struggle with due to the volume).

        I use the clang code model which works ok, but since the build configuration is controlled by the custom Makefile system what QTC 'knows' about each translation unit's compilation switches is not very accurate, and these switches vary on certain groups of files, for historical reasons.

        Clang tooling can read a compile_commands.json file so I am wondering if it is possible for the clang code model to use this when invoked from within QTC.

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

          Sounds interesting, however I'm sorry I don't know if that can be achieved out of the box.

          I'd recommend bringing this to the Qt Creator mailing list. You'll find there Qt Creator developers/maintainers.

          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