Skip to main content
Tools

CMake .gitignore

.gitignore for tools projects

View on GitHub

.gitignore Content

# ============================================================================
# Created by https://gitignores.com/
# TOOL-SPECIFIC TEMPLATE for Cmake
# Website: https://cmake.org/
# Repository: https://github.com/ronald2wing/.gitignores
# ============================================================================

# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# TEMPLATE OVERVIEW & USAGE NOTES
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# • TEMPLATE TYPE: TOOL-SPECIFIC TEMPLATE
# • PURPOSE: Cmake-specific patterns for configuration, cache, logs, and development artifacts
# • DESIGN PHILOSOPHY: Tool-specific patterns for development and deployment workflows
# • COMBINATION GUIDANCE: Combine with language templates for specific development workflows
# • SECURITY CONSIDERATIONS: Does not include security patterns - combine with common/security.gitignore
# • BEST PRACTICES: Combine with appropriate language and security templates, test with your development workflow, review for tool version compatibility
# • OFFICIAL SOURCES: Cmake Tool official documentation, community guidelines, and integration best practices

# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# DEPENDENCY MANAGEMENT & PACKAGE CACHE
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

.cache/cmake/
build/
cmake-build-*/

# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# DEVELOPMENT & RUNTIME ARTIFACTS
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

cmake.log

# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# TESTING & QUALITY ASSURANCE ARTIFACTS
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

coverage/

# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# TOOL-SPECIFIC PATTERNS
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

*.cmake.bak
*.cmake.configure
*.cmake.in
*.in
.7z
.backup/
.bak/
.bash
.checksum
.cmake/
.dependencies/
.deploy/
.deployment/
.deps/
.diff
.fish
.gcov/
.hash
.hashes
.lock
.lockfile
.md5
.patch
.rar
.sh
.sha1
.sha256
.sha512
.sig
.signature
.state
.status
.tar
.tar.gz
.tgz
.timestamp
.timestamps
.zip
.zsh
cmake_install.cmake
CMakeCache.txt
CMakeFiles/
CMakeLists.txt.bak
compile_commands.json
CPack/
CPackConfig.cmake
CPackSourceConfig.cmake
CTestCostData.txt
CTestTestfile.cmake
demo/
demos/
doc/
docs/
example/
examples/
install/
install_manifest.txt
installed/
man/
manual/
modules/
packages/
templates/
Testing/
toolchains/

# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# TEMPLATE CUSTOMIZATION & BEST PRACTICES
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# 1. REVIEW: Examine all patterns before use
# 2. CUSTOMIZE: Adapt to your project's specific structure
# 3. TEST: Use `git check-ignore` to verify patterns work correctly
# 4. SECURE: Always protect sensitive data and credentials
# 5. UPDATE: Review periodically as technology evolves

# Combine with language or framework templates as needed:

# EXAMPLE COMBINATION:
# cat languages/python.gitignore \
#     common/security.gitignore \
#     tools/cmake.gitignore \
#     common/cache.gitignore > .gitignore

Note: This file is fetched from GitHub and cached for 7 days.