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

Visual Studio: Don't override user options. Add additional vs hint information #88244

Merged
merged 1 commit into from
Apr 8, 2024

Conversation

shana
Copy link
Contributor

@shana shana commented Feb 12, 2024

All of NMakePreprocessorDefinitions/NMakeIncludeSearchPath/AdditionalOptions entries that we generate are hints to VS about where to find things, what defines are active, etc, and they're generated based on what scons knows about a particular build configuration. However, there's a lot of implicit compiler settings (like default include paths, default defines, etc), that the compiler adds automatically and that scons can't tell us about. For VS to resolve things more accurately in the editor, either the user or the platform (or both!) need to add some extra information.

This PR makes sure both users and our build system can add additional information to VS about where things are found and what things are defined. It also lets users customize the binary name, in case they want to debug or deploy from VS and the final deployed binary name differs from the default one.

/cc @akien-mga @bruvzg @mhilbrunner

Contrbuted by W4Games ❤️

Make sure we include any user-specified project settings in our
project definitions, this way users can customize their VS
environment to more closely match what they're building for, and
they better can control debugging and deployment from VS.

Add support for setting VS-only compiler defines, include paths, and
additional linker options, as a hint to VS to use when loading projects
and parsing code. VS would usually know these on non nmake projects,
but for nmake projects we have to tell it about any implicit information
that the compiler has, so it can resolve symbols in the editor.
@shana shana requested a review from a team as a code owner February 12, 2024 12:57
@AThousandShips AThousandShips added this to the 4.x milestone Feb 12, 2024
@aaronfranke aaronfranke changed the title VS: Don't override user options. Add additional vs hint information Visual Studio: Don't override user options. Add additional vs hint information Mar 12, 2024
Copy link
Member

@mhilbrunner mhilbrunner left a comment

Choose a reason for hiding this comment

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

Being able to customize these and thus the feature/change IMO is useful, and the code changes make sense to me.

I've noticed no adverse effects from building with this commit included.

@akien-mga akien-mga modified the milestones: 4.x, 4.3 Apr 7, 2024
@akien-mga akien-mga merged commit 1f71d49 into godotengine:master Apr 8, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants