diff options
Diffstat (limited to '3rdparty/genie/src/actions/xcode/xcode_common.lua')
-rw-r--r-- | 3rdparty/genie/src/actions/xcode/xcode_common.lua | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/3rdparty/genie/src/actions/xcode/xcode_common.lua b/3rdparty/genie/src/actions/xcode/xcode_common.lua index 03cd5f87f23..b3f925273b8 100644 --- a/3rdparty/genie/src/actions/xcode/xcode_common.lua +++ b/3rdparty/genie/src/actions/xcode/xcode_common.lua @@ -654,16 +654,13 @@ local wrapperWritten = false local function doblock(id, name, which) - -- start with the project-level commands (most common) - local prjcmds = tr.project[which] - local commands = table.join(prjcmds, {}) - - -- see if there are any config-specific commands to add + -- see if there are any commands to add for each config + local commands = {} for _, cfg in ipairs(tr.configs) do local cfgcmds = cfg[which] - if #cfgcmds > #prjcmds then + if #cfgcmds > 0 then table.insert(commands, 'if [ "${CONFIGURATION}" = "' .. xcode.getconfigname(cfg) .. '" ]; then') - for i = #prjcmds + 1, #cfgcmds do + for i = 1, #cfgcmds do local cmd = cfgcmds[i] cmd = cmd:gsub('\\','\\\\') table.insert(commands, cmd) @@ -792,6 +789,10 @@ _p(4,'EXECUTABLE_EXTENSION = %s;', ext) end + if cfg.flags.ObjcARC then + _p(4,'CLANG_ENABLE_OBJC_ARC = YES;') + end + local outdir = path.getdirectory(cfg.buildtarget.bundlepath) if outdir ~= "." then _p(4,'CONFIGURATION_BUILD_DIR = %s;', outdir) @@ -1035,7 +1036,9 @@ _p(4,'SYMROOT = "%s";', targetdir) end - if cfg.flags.ExtraWarnings then + if cfg.flags.PedanticWarnings + or cfg.flags.ExtraWarnings + then _p(4,'WARNING_CFLAGS = "-Wall";') end |