Provision a C and C++ development environment

Set up LLVM Toolset on Red Hat Enterprise Linux to compile, debug, and build C and C++ applications by using a Red Hat-supported toolchain in your development environment.

Install LLVM Toolset

On Red Hat Enterprise Linux 8, enable the llvm-toolset module to install LLVM Toolset and dependent packages. On Red Hat Enterprise Linux 9 and 10, install the llvm-toolset package instead.

Before you begin

  • All available Red Hat Enterprise Linux updates are installed.

Procedure

  1. Install LLVM Toolset:
    • On RHEL 8, enter:
      # yum module install llvm-toolset
    • On RHEL 9 and 10, enter:
      # dnf install llvm-toolset
  2. To also install the LLDB debugger and the python3-lit package, enter:
    # dnf install lldb python3-lit

Install the CMake build manager

The CMake build manager manages your build process independently from your compiler. CMake generates a native build environment to compile code, create libraries, generate wrappers, and build executable files. Install the cmake package on your system.

Before you begin

Procedure

  • Install CMake:
    # yum install cmake
  • Optional: Install the cmake-doc package for local HTML documentation:
    # dnf install cmake-doc