Implement unsignedchar for xcode

This commit is contained in:
Thomas Desveaux 2018-04-10 21:54:51 +02:00
parent 159281ea5a
commit 6ad87a76c1
2 changed files with 56 additions and 0 deletions

View File

@ -2486,6 +2486,58 @@
]] ]]
end end
function suite.XCBuildConfigurationProject_OnUnsignedCharOn()
workspace("MyWorkspace")
unsignedchar "On"
prepare()
xcode.XCBuildConfiguration_Project(tr, tr.configs[1])
test.capture [[
[MyProject:Debug(2)] /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
GCC_CHAR_IS_UNSIGNED_CHAR = YES;
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
function suite.XCBuildConfigurationProject_OnUnsignedCharOff()
workspace("MyWorkspace")
unsignedchar "Off"
prepare()
xcode.XCBuildConfiguration_Project(tr, tr.configs[1])
test.capture [[
[MyProject:Debug(2)] /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
GCC_CHAR_IS_UNSIGNED_CHAR = NO;
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

@ -1100,6 +1100,10 @@
settings["GCC_SYMBOLS_PRIVATE_EXTERN"] = 'NO' settings["GCC_SYMBOLS_PRIVATE_EXTERN"] = 'NO'
if cfg.unsignedchar ~= nil then
settings['GCC_CHAR_IS_UNSIGNED_CHAR'] = iif(cfg.unsignedchar, "YES", "NO")
end
if cfg.flags.FatalWarnings then if cfg.flags.FatalWarnings then
settings['GCC_TREAT_WARNINGS_AS_ERRORS'] = 'YES' settings['GCC_TREAT_WARNINGS_AS_ERRORS'] = 'YES'
end end