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

Per-file buildoptions on Xcode availability? #1678

Closed
somyungoh opened this issue Jul 29, 2021 · 3 comments
Closed

Per-file buildoptions on Xcode availability? #1678

somyungoh opened this issue Jul 29, 2021 · 3 comments
Labels

Comments

@somyungoh
Copy link
Contributor

Hi all,

In fact, there was already an inquiry regarding this 5 years ago - premake/premake-xcode#27, but is it possible or a way to configure a buildoptions per-file for Xcode? What I would like to do is something like:

filter {"action:xcode4", "files:*.c"}
    buildoptions {"foo"}
filter {"action:xcode4", "files:*.cpp"}
    buildoptions {"bar"}

cheers,

@samsinsane
Copy link
Member

The XCode generator hasn't changed much at all in the last 5 years. It gets minor features added from time to time, but largely the same code as it was 5 years ago. My understanding is that it would require a large overhaul of the generator to support per file configurations. So, no it's not possible to do what you're asking unfortunately. We would be more than happy to accept PRs that move the XCode generator towards per-file config support though.

@starkos starkos modified the milestone: Alpha13 Jul 31, 2021
@starkos
Copy link
Member

starkos commented Aug 1, 2021

@somyungoh You're doing it correctly, so it does look like it isn't yet supported. FWIW, I'm painfully aware of the shortcomings of the current Xcode exporter and working on a new one.

If someone wanted to take this on for v5, you'd probably want to start here. filecfg.buildoptions should contain the per-file build options for that build configuration. Then you'd "just" have to figure out what needs to be written to the .xcodeproj and get it there.

@somyungoh
Copy link
Contributor Author

I see, thank you for letting me know. I'll see if I can do some workaround for my needs from there.

Thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants