Update on CMake project support in Qt Creator
I have been busy improving the CMake support in Qt Creator for the last couple of weeks and thought I should take the time to highlight some of the new features.
The CMake project has announced a new IDE integration mechanism with their 3.14 release called fileapi. It provides about the same level of information as the previous recommended mechanism (server-mode), but does not require a long-running cmake process. This makes the new approach use less resources while being more robust in the face of users running cmake on the command line.
"fileapi" is now supported in Qt Creator (master branch).
CMake support in the Locator
Creator has allowed to trigger the build of CMake targets via the locator for a while now. Simply do
Ctrl-K to focus the locator and then type
cm <target> to build that target.
In master branch this got a small extension: Typing
cmo <target> will open the definition of a target in the editor. This works best when your CMake binary supports fileapi: It will then take you to the exact line the target is defined at. Older CMake binaries will just open the CMakeLists.txt file in the target's source directory instead as there is no information on line numbers available.
Open targets via the Context menu
The same information that is used by the
cmo locator is used to populate a
Open... menu in the target's context menu. That allows to jump straight to lines relevant to the target definition.
Note that this feature has been available for one specific CMake version with server-mode support before, but the necessary support in CMake got removed again and only returned in the fileapi.
That is all I have to show today:-) Please test Qt Creator with CMake 3.14 or later and provide feedback and report bugs. Unfortunately there are currently no snapshots of Qt Creator taken from the master branch, those will only become available after Qt Creator 4.10RC release.
Thanks to Alessandro for demoing these features in a short video!
Subscribe to our newsletter
Try Qt 6.4 Now!
Download the latest release here: www.qt.io/download.
Qt 6 is the productivity platform for the future, with next-gen 2D & 3D UX and limitless scalability.
Explore Qt World
Check our Qt demos and case studies in the virtual Qt World
Check out all our open positions here and follow us on Instagram to see what it's like to be #QtPeople.
Näytä tämä julkaisu Instagramissa.
Want to build something for tomorrow, join #QtPeople today! We have loads of cool jobs you don't want to miss! http://qt.io/careers #builtwithQt #software #developers #coding #framework #tool #tooling #C++ #QML #engineers #sales #tech #technology #UI #UX #CX #Qt #Qtdev #global #openpositions #careers #job
Henkilön Qt (@theqtcompany) jakama julkaisu