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

Added support for Objective-C and Objective-C++ in xcode and gmake2 #1086

Merged
merged 1 commit into from
Apr 6, 2020

Conversation

samsinsane
Copy link
Member

@samsinsane samsinsane force-pushed the ssurtees/objectiveC branch from 55eba61 to 10658a7 Compare May 14, 2018 10:31
@ratzlaff
Copy link
Contributor

ratzlaff commented May 14, 2018

I remember seeing this language file config back when I was making compileas work (.c compiled as .cpp). I dismissed it as stale since I did not find any other references to 'language' as a file configuration parameter outside the xcode module and figured it was leftover cruft from the transition from premake-xcode to premake-core.

This seems like it is doing the same kind of deal as my PR, just with .cpp compiled as .mm. Is 'language' the preferred keyword (over 'compileas') for doing this kind of configuration? I am only asking in case I need to update my PR, which I will happily do.

@samsinsane
Copy link
Member Author

I'm more than happy to change it to use compileas, I think compileas makes more sense. I found two places that used language and only one that used compileas, I wasn't sure why a new API was created and figured sticking to the "majority" was better. Again, I think compileas makes more sense, so I would actually prefer to use it over language. "Compile these files as X" makes more sense than "These files are this language".

@mihaisebea
Copy link

@samsinsane I would say that compileas is redundant (maybe it should be just an alias for language?) Ideally we shouldn't have two ways of doing the same thing as it's confusing.

@samsinsane
Copy link
Member Author

There's been a few other discussions around language and it seems like it might be phased out. I believe that compileas is definitely the correct API to use for this particular PR. A file with the extension cpp is still a C++ file, but we're instructing the IDE/compiler/tool to treat it like a C, Objective-C or Objective-C++ file. I feel that using language instead of compileas would make it kind of confusing to read the Premake scripts, it would appear more like a typo than an intentional action.

I'm not sure when I'll get a chance to update this PR, but if there aren't any objections to using compileas I'll update it to use that instead.

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.

It looks like we were waiting for some follow-up changes on this one; @samsinsane any interest in finishing this one up? I agree that compileras() is a better way forward than language().

@samsinsane
Copy link
Member Author

@starkos unfortunately I won't be able to test it properly as I don't get a chance to work on a Mac very often. It might be better for someone else to pick it up? Or I can pick it back up when I get a chance to work on a Mac again.

@ratzlaff
Copy link
Contributor

We are getting our macs here refreshed so I may be able to test this out

@starkos
Copy link
Member

starkos commented Mar 30, 2020

@samsinsane - How would you like to proceed with this? I'm inclined to rebase it and merge as is, but I'm not set up to test the resulting builds. What say you?

If you're against merging it, I'd like to close it as stale. It is linked to the related issues so it wouldn't be hard to resurrect if someone finds the need.

- Added unit tests for Objective-C and Objective-C++
@samsinsane samsinsane force-pushed the ssurtees/objectiveC branch from 10658a7 to a4bba42 Compare March 31, 2020 08:14
@samsinsane
Copy link
Member Author

@starkos I updated the PR to use compileas instead of language, however, I still wasn't able to try to use it on a mac. I'm happy for this to be merged as-is if it helps people out.

@starkos
Copy link
Member

starkos commented Mar 31, 2020

I'm working up to a new release. Since we can't test this thoroughly ourselves let's hold off until the release branch is cut, and then I'll approve it.

@starkos starkos merged commit 4c11d6e into premake:master Apr 6, 2020
@starkos
Copy link
Member

starkos commented Apr 6, 2020

Changed my mind; there will time enough to review before the release actually gets cut. Merged.

@samsinsane samsinsane deleted the ssurtees/objectiveC branch April 7, 2020 02:11
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.

Xcode has special behavior for disallowed languages Consider adding ObjectiveC flag
4 participants