Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-16824

Getting 4.1 to parse my CMake project

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Invalid
    • Not Evaluated
    • None
    • Qt Creator 4.1.0
    • None

    Description

      Blog commenting seems to gobble up (censor?) my comments so I am posting this here...

      I have experienced hangs while attempting to configure creator for CMake.

      Just FYI for all who may be struggling a little with CMake support and creator 4.1.

      I'm on macOS.

      1. Out of the box kit configuration was not smooth. I ended up deleting my ~/.config/QtProject directory and letting the app re-create it from scratch. Removing creator's .ini should be sufficient for most, but used a hammer here...

      2. Configured a new (or the desktop kit) for Qt, compilers, debug, CMake in preferences. I had very few autodetected tools.

      3. In my shadow build directory, manually ran CMake with my build parameters making sure to select CodeBlocks - Unix Makefiles generation. I discovered that default Unix Makefiles is no longer supported. Your project will not be parsed at all if a CodeBlocks option isn't selected and, which is worse, may hang during build configuration...This step loads up your CMakeCache.txt with initial definitions specific to your project.

      4. The first time you build, creator invokes the external Cmake configuration application. There is some question as to whether this should happen at all, but that's what happens on my system and I haven't tweaked either Qt 5.7 or CMake 3.6 default “out-of-the-box” configurations at all.

      • Make sure your source and build directories are set correctly. There is a very annoying
      • Make sure the generator displayed is no longer Unix Makefiles but the CodeBLocks variant.
      • You should see a lot of red entries. Not to worry, just press configure and the output should match what you exactly get from the command line. If not, something's wrong.
      • Generate your CMake build system, by pressing generate. Shouldn't take long and after the "done" messages , close the window or quit CMake. Creator should pick up from there automatically, parse your C and C++ files and display your build settings.

      The manual is outdated and CMake isn't officially supported.

      I haven't figured out how or where to configure a simple "make -j8" yet, so I may stick to command line builds and use creator as an IDE, debugger, valgrinder etc...hope that works. Just wanted to share what it took, to get (at least) the ide to parse and display my project structure and class hierarchy.

      Regards - Patrice

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              hunger Tobias Hunger
              pkouame patrice kouame
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes