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

Add some missing flags for msc toolset #2081

Merged
merged 1 commit into from
Aug 9, 2023

Conversation

Jarod42
Copy link
Contributor

@Jarod42 Jarod42 commented May 13, 2023

What does this PR do?

For msc toolset:

  • Add some missing flags (compileas/c(pp)dialect).
  • Fix option dependency (D9007: '/external:I' requires '/external:W').
  • Fix toolset version comparison ("msc-v142" < "msc-v80"!) (so vs2005/vs2008) (for external warnings).

How does this PR change Premake's behavior?

Just change msc toolset,
so indirectly affects Codelite (and extern modules such as Code::Blocks, ninja) when using that toolset

Anything else we should know?

One of the fix needed to make ninja works with msvc in my testing repository

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

- Add some missing flags (compileas/c(pp)dialect).
- Fix option dependency (D9007: '/external:I' requires '/external:W').
- Fix toolset version comparison (`"msc-v142" < "msc-v80"`!) (so vs2005/vs2008).
@@ -158,6 +192,12 @@
--

msc.cxxflags = {
cppdialect = {
["C++14"] = "/std:c++14",
Copy link
Collaborator

Choose a reason for hiding this comment

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

How does the cppdialect keyword work currently in VS? I use it in my projects and it seems to work properly. Some other codepath?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

vs20XX generator handle flags internally.
msc.lua is not used from vs20XX generators.

msc.lua is used for Codelite/Code::Blocks/Ninja (gmakeX doesn't support it) generator with msc toolset.

@nickclark2016 nickclark2016 merged commit c135248 into premake:master Aug 9, 2023
@Jarod42 Jarod42 deleted the msc_flags branch August 10, 2023 09:59
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