vscode CUDA C++/C配置记录示例(2)

 lauch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "CUDA C++: Launch",
            "type": "cuda-gdb",
            "request": "launch",
            "program": "${fileDirname}/${fileBasenameNoExtension}",
            "debuggerPath": "/usr/local/cuda/bin/cuda-gdb",
            "preLaunchTask": "build"
        },
    ]
}

tasks.json

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "build",
            "type": "shell",
            "command": "/usr/local/cuda/bin/nvcc",
			"args":["-g","-G","${file}","-o","${fileDirname}/${fileBasenameNoExtension}"],
            "group": {
                "kind": "build",
                "isDefault": true
            }
        }
    ]
}

c_cpp_properties.json

{
    "configurations": [
        {
            "name": "Linux",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [],
            "compilerPath": "/usr/local/cuda/bin/nvcc",
            "cStandard": "c11",
            "cppStandard": "gnu++14",
            "intelliSenseMode": "linux-gcc-x64"
        }
    ],
    "version": 4
}

你可能感兴趣的:(环境配置,vscode,c++,ide)