February 6th, 2020

Code Navigation for CMake Scripts

Will Buik
Program Manager

Visual Studio 2019 16.5 Preview 2 makes it easy to make sense of complex CMake projects. Code navigation features such as Go To Definition and Find All References are now supported for variables, functions, and targets in CMake script files. This can be a huge timesaver because CMake projects with more than a handful of source files are often organized into several CMake scripts to encapsulate each part of the project.

These navigation features work across your entire CMake project to offer more productivity than naïve text search across files and folders. They are also integrated with other IDE productivity features such as Peek Definition.

Go To Definition:

Go To Definition with Peek on a CMake variable.

Find All References:

Find All References working across a CMake project.

You can configure the in-editor documentation and navigation features for CMake scripts in Tools > Options > CMake > Language Services:

CMake script language service settings in “Tools > Options > CMake > Language Services”.

Send Us Feedback

Please try out the latest preview and let us know if you have any feedback. It is always appreciated! The best way to get in touch with us about an issue or suggestion is though Developer Community with the “Report a Problem” or “Suggest a Feature” tools. This makes it easy for us to follow up and for you to get the latest updates about our progress. Feel free to comment here or send an email to cmake@microsoft.com with questions as well.

Author

Will Buik
Program Manager

Will is a Program manager on Visual Studio's C++ IDE team. He works on the C++ project system and design-time language features such as IntelliSense.

1 comment

Discussion is closed. Login to edit/delete existing comments.

  • Gerald Wiltse

    This is really awesome and amazing. This will be crucial in our enterprise migration to CMake.