Skip to content
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

config: Adjust gitignore for CMake #5191

Merged
merged 2 commits into from
Feb 23, 2025
Merged

Conversation

echoix
Copy link
Member

@echoix echoix commented Feb 22, 2025

When trying out locally, I had 8k+ files that wanted to be commited. Adjust the .gitignore in consequence.

I excluded the build/ folder and allowed "Makefile" since we still have some, but if ever someone does a build without using a build directory, the makefiles of the repo will be modified in-place. This also means that if someone uses a different folder name for the build directory, everything but the makefiles will be ignored. I kept the "Makefile" commented out in the .gitignore to show that. Using git clean -d -f -x could help to delete what is not in source control.

@echoix echoix requested a review from nilason February 22, 2025 22:43
@nilason
Copy link
Contributor

nilason commented Feb 22, 2025

We should add a prohibiting check if attempt to build in source root dir. This is good in the meantime.

@echoix echoix requested a review from nilason February 22, 2025 23:06
@nilason nilason added this to the 8.5.0 milestone Feb 22, 2025
@echoix echoix enabled auto-merge (squash) February 22, 2025 23:14
@echoix echoix disabled auto-merge February 22, 2025 23:14
@echoix echoix enabled auto-merge (squash) February 22, 2025 23:15
@echoix
Copy link
Member Author

echoix commented Feb 22, 2025

We should add a prohibiting check if attempt to build in source root dir. This is good in the meantime.

CMake (the latest release at least) already displays a multiline warning saying what's happening and that it will be disallowed in the future, like in this first post: https://discourse.cmake.org/t/cmake-warning-no-source-or-binary-directory-provided/12883

@HuidaeCho
Copy link
Member

We should add a prohibiting check if attempt to build in source root dir. This is good in the meantime.

https://gitlab.kitware.com/cmake/cmake/-/issues/18403?

@echoix echoix merged commit 20906a4 into OSGeo:main Feb 23, 2025
27 checks passed
@echoix echoix deleted the cmake-gitignore branch February 23, 2025 02: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.

3 participants