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

Warning Level at the file level #409

Open
soufianekhiat opened this issue Mar 2, 2025 · 1 comment
Open

Warning Level at the file level #409

soufianekhiat opened this issue Mar 2, 2025 · 1 comment

Comments

@soufianekhiat
Copy link

Hello,

I try to disable the warning level at the file granularity.

Usecase: importing an external library with 1 or 2 cpp file, adding them directly in a project. But they had warning, simple solution would be:

<ClCompile Include="..\..\..\..\extern\fmt\src\format.cc">
  <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Null_Release|x64'">TurnOffAllWarnings</WarningLevel>
</ClCompile>
<ClCompile Include="..\..\..\..\extern\fmt\src\os.cc">
  <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Null_Release|x64'">TurnOffAllWarnings</WarningLevel>
</ClCompile>

If I cannot do that on Sharpmake the currently the workaround are:

  • Creating 2 cpp file that include those external files with a #pragma to disable warnings
  • Create another project with warning disabled and static link it to my project
  • Or turning off warning one by one for my whole project but that the worst case

Far from ideal.

@jspelletier
Copy link
Collaborator

We currently don't support per file options right now in Sharpmake and currently have no plans to implement this.

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

No branches or pull requests

2 participants