Merge pull request #1179 from tempura-sukiyaki/xcode4-xcodebuildsettings-using-false

fix `xcodebuildsettings` using false
This commit is contained in:
Samuel Surtees 2018-10-17 23:07:15 +10:00 committed by GitHub
commit ca5e62bce7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 1 deletions

View File

@ -3156,6 +3156,32 @@
]] ]]
end end
function suite.XCBuildConfigurationProject_OnRemoveXcodebuildSettings()
xcodebuildsettings {
ARCHS = false
}
prepare()
xcode.XCBuildConfiguration_Project(tr, tr.configs[1])
test.capture [[
[MyProject:Debug(2)] /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
GCC_OPTIMIZATION_LEVEL = 0;
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
OBJROOT = obj/Debug;
ONLY_ACTIVE_ARCH = NO;
SYMROOT = bin/Debug;
};
name = Debug;
};
]]
end
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
-- XCBuildConfigurationList tests -- XCBuildConfigurationList tests
--------------------------------------------------------------------------- ---------------------------------------------------------------------------

View File

@ -246,7 +246,7 @@
if type(overrides) == 'table' then if type(overrides) == 'table' then
for name, value in pairs(overrides) do for name, value in pairs(overrides) do
-- Allow an override to remove a value by using false -- Allow an override to remove a value by using false
settings[name] = iif(value ~= false, value, nil) settings[name] = iif(not table.equals(value, { false }), value, nil)
end end
end end
end end