-
Notifications
You must be signed in to change notification settings - Fork 8
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
Update gitignore (again) #7
Conversation
I think these are the basic folders/files we can ignore for all projects. Since we don't provide CMakePresets.json, ignore the user presets will allow users to create their own preset file and use it for the project. We could even add a "starter" one in the exemplar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
.gitignore
Outdated
*build | ||
*out |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain the motivation for this entry?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I've seen, it's idiomatic at times to use out/build
as an output directory; especially when using CMake presets. This allows you to put your installation directory inside out
as well (for testing purposes) without polluting your system environment.
So in some hypothetical preset:
{
"configurePresets" : [
{
"name": "base",
"hidden": true,
"generator": "Ninja",
"binaryDir": "${sourceDir}/out/build/${presetName}",
"installDir": "${sourceDir}/out/install/${presetName}",
"cacheVariables": {
"BUILD_TESTING": "ON",
"CMAKE_CXX_STANDARD": "23",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
},
"architecture": {
"strategy": "external",
"value": "x64"
},
"toolset": {
"strategy": "external",
"value": "x64"
}
}
]
}
*build | ||
*out | ||
CMakeUserPresets.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this entry better reside in a global .gitignore file (like where .*.swp
would go)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could, but then you rely on the developer to have that set up properly.
This looks ready to merge. |
I think these are the basic folders/files we can ignore for all projects. Since we don't provide CMakePresets.json, ignore the user presets will allow users to create their own preset file and use it for the project. We could even add a "starter" one in the exemplar.