fix xcodebuildsettings using false

This commit is contained in:
tempura-sukiyaki 2018-10-17 21:18:03 +09:00
parent 367b227d22
commit 9122554c08
2 changed files with 27 additions and 1 deletions

View File

@ -3156,6 +3156,32 @@
]]
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
---------------------------------------------------------------------------

View File

@ -246,7 +246,7 @@
if type(overrides) == 'table' then
for name, value in pairs(overrides) do
-- 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