1
1

More than 3 years have passed since last update.

VSCodeのCMakeToolsでコンパイラが検出されないとき

Posted at

概要

VSCodeのCMake Toolsでコンパイラを選ぼうとしたときに特定のコンパイラが検出されず、選択できない場合がある。

解決法

~/.local/share/CMakeTools/cmake-tools-kits.json(環境によって違うかもしれない)に、以下を追記

[
    // ここから
    {
        "name": "Clang 11",              // Toolkit選択時に出てくる名前
        "compilers": {
            "C": "/usr/bin/clang-11",    // Cコンパイラへのパス
            "CXX": "/usr/bin/clang++-11" // C++コンパイラへのパス
        }
    },
    // ここまで

    // 以下はもともとあった部分
    {
        "name": "Clang 10.0.0",
        "compilers": {
            "C": "/bin/clang-10",
            "CXX": "/bin/clang++-10"
        }
    },
    // 以下略
]
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1