Interaction

1. About

This will detail

  1. the steps needed to run the cmake or cmake-gui executable
  2. how to choose a generator
  3. how to complete the build

2. Setting Build Variables

2.1. Commonly used CMake variables

Variable Meaning
CMAKE_PREFIX_PATH Path to search for dependent packages
CMAKE_MODULE_PATH Path to search for additional CMake modules
CMAKE_BUILD_TYPE Configuration: Debug \ Release
CMAKE_INSTALL_PREFIX Path to install build target
CMAKE_TOOLCHAIN_FILE File containing cross-compiling data such as toolchains and sysroots.
BUILD_SHARED_LIBS Build shared libraries \ static libraries
CMAKE_EXPORT_COMPILE_COMMANDS Generate a compile_commands.json file for use with clang-based tools

3. References

  1. User Interaction Guide — CMake 3.24.4 Documentation
  2. User Interaction Guide — CMake 3.24.4 Documentation.html
Copyright © gendloop 2024 all right reserved,powered by Gitbook该文件修订时间: 2026-02-10 13:48:53

results matching ""

    No results matching ""