Forrest logo
back to context overview

cmake

List of commands for cmake:

  • cmake:help cmake: Display help, obtain a list of generators.
    $ cmake --help
    try on your machine
    explain this command
  • cmake:tldr:310e1 cmake: Generate a build recipe using `generator_name` as the underlying build system.
    $ cmake -G ${generator_name} ${path-to-project_directory}
    try on your machine
    explain this command
  • cmake:tldr:43804 cmake: Run a custom build target.
    $ cmake --build ${path-to-build_directory} --target ${target_name}
    try on your machine
    explain this command
  • cmake:tldr:4f572 cmake: Install the build artifacts using the custom prefix for paths.
    $ cmake --install ${path-to-build_directory} --strip --prefix ${path-to-directory}
    try on your machine
    explain this command
  • cmake:tldr:5a69a cmake: Use a generated recipe in a given directory to build artifacts.
    $ cmake --build ${path-to-build_directory}
    try on your machine
    explain this command
  • cmake:tldr:5f197 cmake: Generate a build recipe in the current directory with `CMakeLists.txt` from a project directory.
    $ cmake ${path-to-project_directory}
    try on your machine
    explain this command
  • cmake:tldr:9d462 cmake: Generate a build recipe, with build type set to `Release` with CMake variable.
    $ cmake ${path-to-project_directory} -D ${CMAKE_BUILD_TYPE=Release}
    try on your machine
    explain this command
  • cmake:tldr:f49fd cmake: Install the build artifacts into `/usr/local/` and strip debugging symbols.
    $ cmake --install ${path-to-build_directory} --strip
    try on your machine
    explain this command
back to context overview