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

Sharpmake.Options.Vc.Compiler.UseStandardConformingPreprocessor support #387

Merged
merged 3 commits into from
Oct 25, 2024

Conversation

VigneshGunasekaran96
Copy link
Contributor

Added compiler option "Sharpmake.Options.Vc.Compiler.UseStandardConformingPreprocessor" to set the additional option "/Zc:preprocessor"

https://learn.microsoft.com/en-us/cpp/build/reference/zc-preprocessor?view=msvc-170

@bchampoux
Copy link
Member

This seems reasonable. We’ll discuss it next week.

context.SelectOption
(
Options.Option(Options.Vc.Compiler.UseStandardConformingPreprocessor.Default, () => { }),
Options.Option(Options.Vc.Compiler.UseStandardConformingPreprocessor.Disable, () => { context.Configuration.AdditionalCompilerOptions.Add("/Zc:preprocessor-"); }),
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is wrong. Could can't modify Configuration here.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The implementation should be similar to other options. See
Options.Vc.Compiler.GenerateProcessorFile.Disable just above this code which is a very similar option.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added similar setup to Options.Vc.Compiler.GenerateProcessorFile.

…rmingPreprocessor", which:

* adds the additional command line argument "/Zc:preprocessor[-]"
* sets the "UseStandardPreprocessor" option in vcxproj
@jspelletier jspelletier merged commit cb7d39a into ubisoft:main Oct 25, 2024
42 checks passed
jspelletier pushed a commit that referenced this pull request Oct 31, 2024
…rt (#387)

* Added compiler option "Sharpmake.Options.Vc.Compiler.UseStandardConformingPreprocessor" to set the additional option "/Zc:preprocessor"
https://learn.microsoft.com/en-us/cpp/build/reference/zc-preprocessor?view=msvc-170

* Added compiler option "Sharpmake.Options.Vc.Compiler.UseStandardConformingPreprocessor", which:
* adds the additional command line argument "/Zc:preprocessor[-]"
* sets the "UseStandardPreprocessor" option in vcxproj
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