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

Include the configuration condition for ExternalWarningLevel. #1789

Merged
merged 4 commits into from
Feb 22, 2022

Conversation

LoneBoco
Copy link
Contributor

@LoneBoco LoneBoco commented Jan 4, 2022

What does this PR do?

Fixes a bug with ExternalWarningLevel where the entry would be duplicated for every configuration you had.

Before:

<ClCompile Include="file.cpp">
  <ExternalWarningLevel>Level3</ExternalWarningLevel>
  <ExternalWarningLevel>Level3</ExternalWarningLevel>
  <ExternalWarningLevel>Level3</ExternalWarningLevel>
  <ExternalWarningLevel>Level3</ExternalWarningLevel>
</ClCompile>

After:

<ClCompile Include="file.cpp">
  <ExternalWarningLevel>Level3</ExternalWarningLevel>
</ClCompile>

How does this PR change Premake's behavior?

No breaking changes.

Anything else we should know?

The bug was introduced with changeset 065b3ac.

Did you check all the boxes?

  • Focus on a single fix or feature; remove any unrelated formatting or code changes
  • Add unit tests showing fix or feature works; all tests pass
  • Mention any related issues (put closes #XXXX in comment to auto-close issue when PR is merged)
  • Follow our coding conventions
  • Minimize the number of commits
  • Align documentation to your changes

You can now support Premake on our OpenCollective. Your contributions help us spend more time responding to requests like these!

Copy link
Contributor

@Jarod42 Jarod42 left a comment

Choose a reason for hiding this comment

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

You checked "Add Unit tests", but don't provide tests to show old bug.

modules/vstudio/vs2010_vcxproj.lua Show resolved Hide resolved
@LoneBoco
Copy link
Contributor Author

LoneBoco commented Jan 5, 2022

Okay, I fixed all instances of file level handling of externalwarnings and externalanglebrackets, including adding tests for them.

@LoneBoco
Copy link
Contributor Author

LoneBoco commented Jan 5, 2022

I also prevented it from exporting on the file level if it wasn't declared.

@samsinsane samsinsane merged commit 1b8ef89 into premake:master Feb 22, 2022
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.

4 participants