Skip to content

Update Gitignore to ignore generated files. #8624

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

bridgewaterrobbie
Copy link
Contributor

No description provided.

@bridgewaterrobbie bridgewaterrobbie added the internal Issue/PR does not affect clients label Apr 15, 2025
Comment on lines +21 to +35
build/.cmake/
build/CMakeCache.txt
build/CMakeFiles/
build/Makefile
build/SPIRV-Tools*
build/cmake_install.cmake
build/compile_commands.json
build/filament/
build/include/
build/libs/
build/mac/ninja
build/samples/
build/shaders/
build/third_party/
build/tools/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason to not put all of build/** in the gitignore?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build folder has quite a few things checked in already, https://github.com/google/filament/tree/main/build

This overloading means that to ignore only the generated files I need to be specific.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bridgewaterrobbie is this useful for you because your CLion CMake profile(s) uses "build" as your "Build directory" setting vs. the default cmake-build-...? Or accounting for folks that might do that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No it isn't due to changes to my cmake.

I believe my initial post about the source of these files may be wrong and it is not from CLion builds (Though I'd still like this), I think this came about from me locally running CI checks to validate my changes before pushing. IMO this is still nice to have as that should be a good practice.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah CI checks, that makes sense 👍 Yes, "build" is a very common name for the build directory of a CMake project, agreed :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few things that can put output here I think, but one example iis

cd build/mac
./build.sh presubmit

IE just me copying https://github.com/google/filament/blob/main/.github/workflows/presubmit.yml#L27

Copy link
Contributor

@poweifeng poweifeng Apr 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So interestingly, I ran that CI, and the only one that showed up is build/mac/ninja and I think it might make sense to move that to a github action as oppose to using an explicit script.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can take that as an AI.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bridgewaterrobbie , I cleaned up a lot of the CI stuff, and running these scripts shouldn't add anything to the build folder anymore. Would you mind checking?

If no unintended artifacts are generated by running CI scripts locally, then I propose we do not add these gitignore entries. Please let me know if you have a different thought on this. Thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, this looks good now in my testing. Thank you @poweifeng

Copy link
Collaborator

@pixelflinger pixelflinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we make it so it doesn't generate anything outside of the cmake build directories? I didn't realize what this change was for.

like, we need separate output dirs for like release/debug all that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Issue/PR does not affect clients
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants