Skip to content

feat(qt): add build directory to gitignore#4838

Open
add-uos wants to merge 1 commit intogithub:mainfrom
add-uos:feat-qt-add-build-dir
Open

feat(qt): add build directory to gitignore#4838
add-uos wants to merge 1 commit intogithub:mainfrom
add-uos:feat-qt-add-build-dir

Conversation

@add-uos
Copy link
Copy Markdown

@add-uos add-uos commented Apr 7, 2026

Reasons for making this change

Qt projects commonly use a build/ directory for out-of-source builds, especially when using CMake (the default build system for Qt 6). While Qt.gitignore already includes *build-* to handle Qt Creator's build directories (e.g., build-MyProject-Debug), it doesn't cover the standard build/ directory that many Qt projects use.

This change applies to all Qt developers because:

  1. Qt 6 uses CMake by default, which commonly generates a build/ directory
  2. The official Qt documentation and examples often use build/ as the build directory
  3. Many Qt tutorials and best practices recommend using a build/ directory for out-of-source builds
  4. This aligns with C++.gitignore, which also includes build/

Links to documentation supporting these rule changes

  • Qt 6 Documentation: CMake Manual - Shows examples using build/ directory
  • Qt Wiki: Building Qt 5 from Git - Recommends using a separate build directory
  • Qt Creator Manual: Build Settings - Documents how Qt Creator creates build directories
  • CMake Documentation: CMake Tutorial - Standard practice is to use a build/ directory

Related .gitignore files:

  • C++.gitignore (already includes build/)
  • Python.gitignore (already includes build/)
  • Most other language templates include build/ as it's a universal convention

If this is a new template

N/A - This is an improvement to an existing template

Merge and Approval Steps

  • Confirm that you've read the contribution guidelines and ensured your PR aligns
  • Ensure CI is passing
  • Get a review and Approval from one of the maintainers

@add-uos add-uos requested a review from a team as a code owner April 7, 2026 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant