CMake support in Visual Studio 2017

Play CMake support in Visual Studio 2017
Sign in to queue


Visual Studio 2017 adds built-in support for CMake. Watch this video to learn more about how the latest Visual Studio release fundamentally changes the way you interact with your CMake projects and your source code from the IDE.

To learn more about this, visit



Session Type:






Right click to download this episode

The Discussion

  • User profile image

    Is there a way to set the debug working directory? I have dependencies that are obviously not in the build output folder.

  • User profile image
    Marian Luparu [MSFT]

    @DJLeach, you can customize the working directory for your debug session, by specifying "currentDir": "<yourfolder>" in one of your debug configurations inside the launch.vs.json file. HTH

  • User profile image

    Will VS 2017 have syntax highlighting and intellisense for the CMakeLists.txt when released?

  • User profile image
    Tarmo Pikaro

    Hi !

    I'm working on tool syncProj, which somehow resembles cmake project generator, but it's based on C# programming language and if necessary it can be really debugged with intellisense turned on.

    Initial documentation on subject:

    Currently I'm trying to configure C++ project, and script itself is written in C# language, and because it's defined as custom build step, all visual studio is able to display is just a code syntax hi-lightning. Meanwhile intellisense kicks in only after you open C# script via C# / script editor.

    Would it be possible to get intellisense supported even for custom defined tool ?

  • User profile image
    keerthi datta

    How to add gecode directories to cmake projects?

  • User profile image

    In the launch_schema.json there is "environment". I try modify or set new environment variable. But it's not working. My launch.vs.json:
    "version": "0.2.1",
    "defaults": {},
    "configurations": [
    "type": "default",
    "project": "CMakeLists.txt",
    "projectTarget": "${buildRoot}\\TestGui.exe",
    "name": "${buildRoot}\\TestGui.exe",
    "environment": [
    "name": "XPATH",
    "value": "h:/Qt/Qt5.9.2/5.9.2/msvc2015/bin/"

    In the main I try get environment:
    char* xvar = getenv("XPATH");
    But getenv returns NULL.

Add Your 2 Cents