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

Support buildaction for C++ projects #1113

Merged
merged 1 commit into from
Jun 9, 2018

Conversation

TurkeyMan
Copy link
Contributor

Had to remove 'allowed', since the list of possible build actions is extensible and kinda arbitrary.

Copy link
Member

@samsinsane samsinsane left a comment

Choose a reason for hiding this comment

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

LGTM, should this still validate the C# input? Over in the csproj code, rather than _premake_init.lua?

@TurkeyMan
Copy link
Contributor Author

Yeah, it probably needs to result in None if a bad action name name was given.

I think C# also has an arbitrary/extensible set of buildactions just the same as C++ no?
One lame thing about the C# build actions is that the existing list of actions are MAPPED to the real action names. I think C# should accept the real action names, and not re-name them as it has.

Also, I think the C# code should really be refactored into rules, just like the C++ project code.

@TurkeyMan
Copy link
Contributor Author

It's already handled: https://github.com/premake/premake-core/blob/master/src/tools/dotnet.lua#L63
If buildaction is given some value that isn't supported, it may end out with None, which is what the new C++ implementation does.
That said, there's also a bunch of other logic and matching going on in that code for other conditions, but it wouldn't be right to change any of that.

@TurkeyMan
Copy link
Contributor Author

I'll update the wiki to document the removed 'allowed' fields when this merges.

@TurkeyMan
Copy link
Contributor Author

Amended with a unit-test, cus I'm a stylish guy like that ;)

@TurkeyMan TurkeyMan merged commit fddc822 into premake:master Jun 9, 2018
@TurkeyMan TurkeyMan deleted the buildaction_for_cpp branch June 11, 2018 20:58
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.

2 participants