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

Compiler Version support for Visual Studion 2017+ #1655

Merged
merged 2 commits into from
Jun 25, 2021

Conversation

nickclark2016
Copy link
Member

What does this PR do?

Adds compiler version support for VS 2017 and newer

How does this PR change Premake's behavior?

No breaking changes, all new functionality.

Syntax

toolsversion "1.2.3"

This will add the following to the globals group in VS 2017 and newer project files.

<VCToolsVersion>1.2.3</VCToolsVersion>

It is worth noting that this does no checks for legal tool versions. That is on the user. I believe it would be more hassle than it is worth to go check for all installed tool version, then validate user input against that.

Anything else we should know?

Closes #1612

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!

Comment on lines 1702 to 1709
elseif cfg.compileas == "Module" then
elseif cfg.compileas == "Module" then
m.element("CompileAs", condition, "CompileAsCppModule")
elseif cfg.compileas == "ModulePartition" then
elseif cfg.compileas == "ModulePartition" then
m.element("CompileAs", condition, "CompileAsCppModuleInternalPartition")
elseif cfg.compileas == "HeaderUnit" then
elseif cfg.compileas == "HeaderUnit" then
Copy link
Member Author

Choose a reason for hiding this comment

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

Looks like this got caught in light ending fixes.

Comment on lines 188 to 190
"Module",
"ModulePartition",
"HeaderUnit"
"Module",
"ModulePartition",
"HeaderUnit"
Copy link
Member Author

Choose a reason for hiding this comment

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

Same as above. This was caught in line ending fixes.

Copy link
Member

@starkos starkos left a comment

Choose a reason for hiding this comment

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

Nice, thanks!

@starkos starkos merged commit e0af9ba into premake:master Jun 25, 2021
@KyrietS
Copy link
Member

KyrietS commented Jun 25, 2021

Hey @nickclark2016, you forgot to add "toolsversion" to website/sidebars.js file. Can you fix it in another commit?

Btw. the latest version of docusaurus introduced some kind of automation for sidebars. It's not perfect yet but I'll try this feature in time.

@nickclark2016
Copy link
Member Author

@KyrietS Ahh crap, yup, I'll do that.

@KyrietS
Copy link
Member

KyrietS commented Jul 26, 2021

@nickclark2016 *cough* *cough* 🙃

@nickclark2016
Copy link
Member Author

@nickclark2016 cough cough 🙃

Oh crap, totally slipped my mind. Standby

KyrietS added a commit that referenced this pull request Jul 26, 2021
Updated sidebar to include toolsversion link
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.

add support for compiler version selection
3 participants