premake / premake-core

Premake
https://premake.github.io/
BSD 3-Clause "New" or "Revised" License
3.22k stars 620 forks source link

Xcode does not support custom build commands #940

Open wraitii opened 6 years ago

wraitii commented 6 years ago

It seems the Xcode module does not handle custom build commands. We just switched to using them for 0 A.D.'s build system for the tests, and the Xcode test project doesn't work.

This is apparently the subject of a "forgotten" PR.

This can be tested by building 0 A.D., but the following "minimal" example works too:

workspace "Example"
    configurations { "Release" }
    platforms { "macOS" }
    location ("workspaces/")
    language "C++"
    targetdir ("build/output")
    objdir ("build/obj")
    nativewchar "Off"
    buildoptions { "-Wall", "-Wextra" }

project "Example"
    kind "ConsoleApp"

    files { "main.cpp" }

    filter "files:*.cpp"
        buildmessage 'Doing stuff'
        buildcommands {
            'touch somefile.cpp'
        }

        buildoutputs { 'somefile.cpp' }
na-Itms commented 6 years ago

To clarify the issue we have, we wrote a small premake module for cxxtest here: https://trac.wildfiregames.com/browser/ps/trunk/build/premake/cxxtest/cxxtest.lua The code works around the limitations of the gmake action (we may look into the gmake2 action in the future) so the issue here is not #223.

Thanks in advance! 🙂