Files
vim-ale/cmake
AJ ONeal 23100394ac ref(installerconf): rename config keys and add full URL support
Renames:
- github_repo → github_releases (back-compat kept)
- github_source → github_sources (back-compat kept)
- gitea_repo → gitea_releases (back-compat kept)

New keys:
- gitea_sources, gitlab_releases, gitlab_sources

All keys now accept either owner/repo shorthand or full URLs:
- github_releases = sharkdp/bat
- github_releases = https://github.com/sharkdp/bat
- gitea_releases = https://git.rootprojects.org/root/pathman

Defaults: github → github.com, gitlab → gitlab.com.
Gitea has no default (self-hosted only).

Updated all 73 releases.conf files from github_repo to github_releases.
2026-03-11 11:51:43 -06:00
..
2026-03-08 19:38:49 -06:00

title, homepage, tagline
title homepage tagline
CMake https://github.com/Kitware/CMake CMake is a cross-platform, open-source build system generator

To update or switch versions, run webi cmake@stable (or @v2, @beta, etc).

Files

These are the files / directories that are created and/or modified with this install:

~/.config/envman/PATH.env
~/.local/bin/cmake
~/.local/opt/cmake

Cheat Sheet

CMake is a cross-platform alternative to autoconf that works on Windows, Mac, and Linux

A project structure looks like this:

my-project/
├── build/
├── CMakeLists.txt
├── hello-world*
└── hello-world.cpp

And can be built my running cmake from the build directory:

pushd ./build/
cmake ../
make

How to create a Hello World with CMake

Lets create a hello world program in C++ and build it with CMake.

  1. Create a project directory

    mkdir ./my-project/
    pushd ./my-project/
    
  2. Create a Hello World C++ file named hello-world.cpp hello-world.cpp:

    #include <iostream>
    
    int main(int argc, char** argv) {
        std::cout << "Hello World!" << std::endl;
        return 0;
    }
    
  3. Create a CMakeLists.txt to compile our code CMakeLists.txt:

    project{hello-world}
    cmake_minimum_required(VERSION 3.10)
    
    add_executable(hello-world hello-world.cpp)
    
  4. Create a build directory and build the binary

    mkdir ./build/
    pushd ./build/
    cmake ../
    make
    
  5. Test the built binary:

    ./hello-world