简体   繁体   English

Premake4:如何将mac os x xcode C ++项目设置为具有“仅构建活动配置”选项处于活动状态?

[英]Premake4: How to set mac os x xcode C++ project to have option “build active configuration only” active?

Problem: when you do not specify that option xcode project tries to build all it can (in my case not only i386 but also some other archs which I do not have library's for and I do not need.) 问题:当您未指定该选项时,xcode项目将尝试构建所有可能的文件(在我的情况下,不仅是i386,而且还有一些我没有提供库且不需要的其他拱门)。

Current solution - open generated xcode project and set that option in all configurations. 当前解决方案-打开生成的xcode项目并在所有配置中设置该选项。

Desired solution - I need to set that option inside premake script. 所需的解决方案-我需要在预制脚本中设置该选项。

Question - how to do such much desired thing? 问题-怎么做这么渴望的事情?

The premake stable bitbucket repo now does this by default for debug configurations. 现在,对于调试配置,默认情况下,预制的稳定bitbucket存储库会执行此操作。 https://bitbucket.org/premake/premake-stable/changeset/da9d0562b09c https://bitbucket.org/premake/premake-stable/changeset/da9d0562b09c

If you really only want i386 (32 bits), then I guess this is what you'd need in your Premake script: 如果您真的只想要i386(32位),那么我想这就是您在Premake脚本中需要的:

platforms { "x32" }

You probably had this until now: 到目前为止,您可能已经拥有了:

platforms { "native", "universal" }

Which on virtually every Intel Mac means x64 when going native and x32 + x64 when going universal. 实际上,每台Intel Mac上的本机意味着本机为x64,通用为x32 + x64。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM