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

Update gitignore (again) #7

Merged
merged 2 commits into from
Sep 30, 2024
Merged

Update gitignore (again) #7

merged 2 commits into from
Sep 30, 2024

Conversation

DeveloperPaul123
Copy link
Member

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.

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.
Copy link
Member

@camio camio left a 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 Show resolved Hide resolved
.gitignore Outdated
*build
*out
Copy link
Member

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?

Copy link
Member Author

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
Copy link
Member

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)?

Copy link
Member Author

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.

@JeffGarland
Copy link
Member

This looks ready to merge.

@camio camio merged commit b6a2d24 into main Sep 30, 2024
@DeveloperPaul123 DeveloperPaul123 deleted the PT/update-gitignore branch November 19, 2024 02:43
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