CMake Build Tool
发布商:Huawei Cloud
安装量328
(2)
Cpp Build Tool 插件用于 CodeArts IDE for C++ 中基于 CMake 的项目。

CMake-build-tool

CMake Build Tool provides the native developer a full-featured, convenient, and powerful workflow for CMake-based projects in Codearts.

Capabilities provided by the CMake Build Tool extension for developers:

  1. Loading a CMake Project

    When the IDE detects that the opened project is a CMake project, the IDE automatically performs the following operations::

    • Generate the cmake-build-debug directory.
    • Generate and import the compile_commands.json file. The CMake project obtains the code detection and prompt functions of the Huawei C/C++ extension.
    • Generate the tasks.json and launch.json files.
  2. Multiple build types

    • Debug:Disables optimization and includes debugging information.
    • Release:Includes optimizations but no debugging information.
    • MinRelSize:Optimize size and no debugging information.
    • RelWithDebInfo:Optimizes speed and includes debugging information.

  3. Debugging the CMake Project

    Open main.cpp and place a breakpoint on the line, std::cout, and click the debug icon.

  4. Running the CMake Project

    • Run the launch.json file

    • Right-click to run executable file

  5. Build the CMake Project

    You can build from either of the following channels:

    • Open the command panel and run the CMake Build Tool: CMake Targets command

    • Click on the Build menu

    • Click the build icon.

    • Build panel

    After the build, the build logs are displayed on the right of the build panel.

  6. Multiple generator types

    The CMake Build Tool provides two generator types for CMake projects: ninja and make. When the IDE builds a project, the ninja generator is used by default.

Common Settings

  1. Path of the cmake project build tool

    The CodeArts IDE for C/C++ provides tools required for building and debugging CMake projects. Users can directly build and debug CMake projects without manually configuring related environment variables.

    The CMake, MinGW, and ninja tools are built in the .codearts directory of the user directory. By default, the CMake Build Tool extension preferentially reads the built-in tool path.

    • cpp-build-tool.CMakeBuildTool.CMake.value: Obtain the path of the CMake tool
    • cpp-build-tool.CMakeBuildTool.debugger.value: Obtain the path of the MinGW tool
    • cpp-build-tool.CMakeBuildTool.buildTool.value: Obtain the path of the ninja tool