CMake support in Visual Studio 2017

Sign in to queue

The Discussion

  • User profile image
    DJLeach

    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
    LordDrako

    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:

    https://docs.google.com/document/d/1C1YrbFUVpTBXajbtrC62aXru2om6dy5rClyknBj5zHU/edit

    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
    Victor

    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