2

I'm trying to get TBB to work with premake5.

TBB has some fairly non-standard things going on in its project files.

  1. It includes .asm files in the project(premake5 seems ok with this)

  2. The .asm files are different for 32bit/64bit etc, so some files need to be excluded depending on the architecture. TBB does this by using "exclude from build" flag in VS, this way the files show up in the project, but are only actual build if they aren't flagged as excluded. I'm not seeing any way to replicate this in premake5 yet. Premake5 has "excludes" but it seems to completely remove the files from the project instead of marking them as not built, it also appears to not work when filtered by platforms.

  3. The asm files are marked as: Item Type = Microsoft Macro Assembler in TBB's project. I am not sure how to make premake5 do this. Currently when I add them to my premake5 generated project, Item type is blank. TBB also marks them Execute Before: Midl Execute After: CustomBuild

This seems like it might be beyond what premake5 supports, so maybe this isn't even supported:/ ?

4

1 回答 1

0

它在项目中包含 .asm 文件(premake5 似乎可以)

是的,这应该没问题。

.asm 文件对于 32 位/64 位等是不同的,因此需要根据体系结构排除某些文件。

你会想做这样的事情:

solution "MySolution"
   configurations { "Debug", "Release" }
   platforms { "x86", "x86_64" }

project "MyProject"
    kind "ConsoleApp" -- or whatever set things up here

filter { "platforms:x86" }
    files {
       -- 32-bit files go here
    }

filter { "platforms:x86_64" }
    files {
        -- 64-bit files go here
    }

asm 文件标记为:Item Type = TBB 项目中的 Microsoft Macro Assembler。

Premake 目前不这样做,也不会自动包含 MASM 规则,这可能也是需要的?可能值得开一张票,以便开发人员可以解决它。

于 2015-07-18T18:18:59.633 回答