Patch 3367641: Remove warnings in Xcode 4

This commit is contained in:
Jason Perkins 2011-10-20 16:36:24 -04:00
parent 562746c1f4
commit 2a0a79c243
6 changed files with 69 additions and 39 deletions

View File

@ -32,6 +32,7 @@
* Patch 3021550: Add Wii homebrew platform (Pathogen David)
* Patch 3035550: Make/Distcc outputs dependencies to wrong location
* Patch 3138574: NoImportLib ignored in Windows makefiles dependencies (rjmyst3)
* Patch 3367641: Remove warnings in Xcode 4
-------

View File

@ -1,7 +1,7 @@
--
-- xcode_common.lua
-- Functions to generate the different sections of an Xcode project.
-- Copyright (c) 2009-2010 Jason Perkins and the Premake project
-- Copyright (c) 2009-2011 Jason Perkins and the Premake project
--
local xcode = premake.xcode
@ -481,7 +481,7 @@
_p(2,'08FB7793FE84155DC02AAC07 /* Project object */ = {')
_p(3,'isa = PBXProject;')
_p(3,'buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "%s" */;', tr.name)
_p(3,'compatibilityVersion = "Xcode 3.1";')
_p(3,'compatibilityVersion = "Xcode 3.2";')
_p(3,'hasScannedForEncodings = 1;')
_p(3,'mainGroup = %s /* %s */;', tr.id, tr.name)
_p(3,'projectDirPath = "";')
@ -748,7 +748,7 @@
_p(4,'GCC_ENABLE_CPP_RTTI = NO;')
end
if cfg.flags.Symbols and not cfg.flags.NoEditAndContinue then
if _ACTION ~= "xcode4" and cfg.flags.Symbols and not cfg.flags.NoEditAndContinue then
_p(4,'GCC_ENABLE_FIX_AND_CONTINUE = YES;')
end
@ -814,8 +814,6 @@
flags = table.join(flags, cfg.linkoptions)
xcode.printlist(flags, 'OTHER_LDFLAGS')
_p(4,'PREBINDING = NO;')
if cfg.flags.StaticRuntime then
_p(4,'STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = static;')
end

View File

@ -0,0 +1,59 @@
--
-- tests/actions/xcode/test_xcode4_project.lua
-- Automated test suite for Xcode project generation.
-- Copyright (c) 2011 Jason Perkins and the Premake project
--
T.xcode4_project = { }
local suite = T.xcode4_project
local xcode = premake.xcode
---------------------------------------------------------------------------
-- Setup/Teardown
---------------------------------------------------------------------------
local sln, tr
function suite.setup()
_ACTION = "xcode4"
io.eol = "\n"
xcode.used_ids = { } -- reset the list of generated IDs
sln = test.createsolution()
end
local function prepare()
premake.bake.buildconfigs()
xcode.preparesolution(sln)
local prj = premake.solution.getproject(sln, 1)
tr = xcode.buildprjtree(prj)
end
---------------------------------------------------------------------------
-- XCBuildConfiguration_Project tests
---------------------------------------------------------------------------
function suite.XCBuildConfigurationProject_OnSymbols()
flags { "Symbols" }
prepare()
xcode.XCBuildConfiguration_Project(tr, tr.configs[1])
test.capture [[
[MyProject:Debug(2)] /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
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 = YES;
};
name = "Debug";
};
]]
end

View File

@ -1,7 +1,7 @@
--
-- tests/actions/xcode/test_xcode_dependencies.lua
-- Automated test suite for Xcode project dependencies.
-- Copyright (c) 2009 Jason Perkins and the Premake project
-- Copyright (c) 2009-2011 Jason Perkins and the Premake project
--
T.xcode3_deps = { }
@ -249,7 +249,7 @@
08FB7793FE84155DC02AAC07 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "MyProject" */;
compatibilityVersion = "Xcode 3.1";
compatibilityVersion = "Xcode 3.2";
hasScannedForEncodings = 1;
mainGroup = [MyProject] /* MyProject */;
projectDirPath = "";

View File

@ -1,7 +1,7 @@
--
-- tests/actions/xcode/test_xcode_project.lua
-- Automated test suite for Xcode project generation.
-- Copyright (c) 2009-2010 Jason Perkins and the Premake project
-- Copyright (c) 2009-2011 Jason Perkins and the Premake project
--
T.xcode3_project = { }
@ -16,7 +16,7 @@
local sln, tr
function suite.setup()
premake.action.set("xcode3")
_ACTION = "xcode3"
io.eol = "\n"
xcode.used_ids = { } -- reset the list of generated IDs
sln = test.createsolution()
@ -656,7 +656,7 @@
08FB7793FE84155DC02AAC07 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "MyProject" */;
compatibilityVersion = "Xcode 3.1";
compatibilityVersion = "Xcode 3.2";
hasScannedForEncodings = 1;
mainGroup = [MyProject] /* MyProject */;
projectDirPath = "";
@ -1084,7 +1084,6 @@
GCC_WARN_UNUSED_VARIABLE = YES;
OBJROOT = "obj/Debug";
ONLY_ACTIVE_ARCH = NO;
PREBINDING = NO;
};
name = "Debug";
};
@ -1109,7 +1108,6 @@
GCC_WARN_UNUSED_VARIABLE = YES;
OBJROOT = "obj/Debug";
ONLY_ACTIVE_ARCH = NO;
PREBINDING = NO;
};
name = "Debug";
};
@ -1134,7 +1132,6 @@
GCC_WARN_UNUSED_VARIABLE = YES;
OBJROOT = "obj/Debug";
ONLY_ACTIVE_ARCH = NO;
PREBINDING = NO;
};
name = "Debug";
};
@ -1159,7 +1156,6 @@
GCC_WARN_UNUSED_VARIABLE = YES;
OBJROOT = "obj/Debug";
ONLY_ACTIVE_ARCH = NO;
PREBINDING = NO;
STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = static;
};
name = "Debug";
@ -1186,7 +1182,6 @@
GCC_WARN_UNUSED_VARIABLE = YES;
OBJROOT = "obj/Debug";
ONLY_ACTIVE_ARCH = NO;
PREBINDING = NO;
SYMROOT = "bin";
};
name = "Debug";
@ -1216,7 +1211,6 @@
GCC_WARN_UNUSED_VARIABLE = YES;
OBJROOT = "obj/Debug";
ONLY_ACTIVE_ARCH = NO;
PREBINDING = NO;
};
name = "Debug";
};
@ -1245,7 +1239,6 @@
);
OBJROOT = "obj/Debug";
ONLY_ACTIVE_ARCH = NO;
PREBINDING = NO;
};
name = "Debug";
};
@ -1274,7 +1267,6 @@
"build option 1",
"build option 2",
);
PREBINDING = NO;
};
name = "Debug";
};
@ -1302,7 +1294,6 @@
OTHER_LDFLAGS = (
"-lldap",
);
PREBINDING = NO;
};
name = "Debug";
};
@ -1330,7 +1321,6 @@
"link option 1",
"link option 2",
);
PREBINDING = NO;
};
name = "Debug";
};
@ -1355,7 +1345,6 @@
GCC_WARN_UNUSED_VARIABLE = YES;
OBJROOT = "obj/Debug";
ONLY_ACTIVE_ARCH = NO;
PREBINDING = NO;
WARNING_CFLAGS = "-Wall";
};
name = "Debug";
@ -1382,7 +1371,6 @@
GCC_WARN_UNUSED_VARIABLE = YES;
OBJROOT = "obj/Debug";
ONLY_ACTIVE_ARCH = NO;
PREBINDING = NO;
};
name = "Debug";
};
@ -1410,7 +1398,6 @@
OTHER_CFLAGS = (
"-ffast-math",
);
PREBINDING = NO;
};
name = "Debug";
};
@ -1438,7 +1425,6 @@
OTHER_CFLAGS = (
"-ffloat-store",
);
PREBINDING = NO;
};
name = "Debug";
};
@ -1464,7 +1450,6 @@
GCC_WARN_UNUSED_VARIABLE = YES;
OBJROOT = "obj/Debug";
ONLY_ACTIVE_ARCH = YES;
PREBINDING = NO;
};
name = "Debug";
};
@ -1491,7 +1476,6 @@
GCC_WARN_UNUSED_VARIABLE = YES;
OBJROOT = "obj/Debug";
ONLY_ACTIVE_ARCH = NO;
PREBINDING = NO;
};
name = "Debug";
};
@ -1519,7 +1503,6 @@
OTHER_CFLAGS = (
"-fomit-frame-pointer",
);
PREBINDING = NO;
};
name = "Debug";
};
@ -1545,7 +1528,6 @@
GCC_WARN_UNUSED_VARIABLE = YES;
OBJROOT = "obj/Debug";
ONLY_ACTIVE_ARCH = NO;
PREBINDING = NO;
};
name = "Debug";
};
@ -1571,7 +1553,6 @@
GCC_WARN_UNUSED_VARIABLE = YES;
OBJROOT = "obj/Debug";
ONLY_ACTIVE_ARCH = NO;
PREBINDING = NO;
};
name = "Debug";
};
@ -1598,7 +1579,6 @@
GCC_WARN_UNUSED_VARIABLE = YES;
OBJROOT = "obj/Debug";
ONLY_ACTIVE_ARCH = YES;
PREBINDING = NO;
};
name = "Debug";
};
@ -1627,7 +1607,6 @@
);
OBJROOT = "obj/Debug";
ONLY_ACTIVE_ARCH = NO;
PREBINDING = NO;
};
name = "Debug";
};
@ -1654,7 +1633,6 @@
GCC_WARN_UNUSED_VARIABLE = YES;
OBJROOT = "obj/Debug";
ONLY_ACTIVE_ARCH = NO;
PREBINDING = NO;
};
name = "Debug";
};
@ -1679,7 +1657,6 @@
GCC_WARN_UNUSED_VARIABLE = YES;
OBJROOT = "obj/Universal/Debug";
ONLY_ACTIVE_ARCH = NO;
PREBINDING = NO;
};
name = "Debug";
};
@ -1704,7 +1681,6 @@
GCC_WARN_UNUSED_VARIABLE = YES;
OBJROOT = "obj/Universal32/Debug";
ONLY_ACTIVE_ARCH = NO;
PREBINDING = NO;
};
name = "Debug";
};
@ -1729,7 +1705,6 @@
GCC_WARN_UNUSED_VARIABLE = YES;
OBJROOT = "obj/Universal64/Debug";
ONLY_ACTIVE_ARCH = NO;
PREBINDING = NO;
};
name = "Debug";
};
@ -1754,7 +1729,6 @@
GCC_WARN_UNUSED_VARIABLE = YES;
OBJROOT = "obj/Debug";
ONLY_ACTIVE_ARCH = NO;
PREBINDING = NO;
};
name = "Debug";
};
@ -1779,7 +1753,6 @@
GCC_WARN_UNUSED_VARIABLE = YES;
OBJROOT = "obj/x32/Debug";
ONLY_ACTIVE_ARCH = NO;
PREBINDING = NO;
};
name = "Debug";
};
@ -1804,7 +1777,6 @@
GCC_WARN_UNUSED_VARIABLE = YES;
OBJROOT = "obj/x64/Debug";
ONLY_ACTIVE_ARCH = NO;
PREBINDING = NO;
};
name = "Debug";
};
@ -1828,7 +1800,6 @@
GCC_WARN_UNUSED_VARIABLE = YES;
OBJROOT = "obj/Universal32/Debug";
ONLY_ACTIVE_ARCH = NO;
PREBINDING = NO;
};
name = "Debug 32-bit Universal";
};

View File

@ -121,6 +121,7 @@
dofile("actions/xcode/test_xcode_dependencies.lua")
-- Xcode4 tests
dofile("actions/xcode/test_xcode4_project.lua")
dofile("actions/xcode/test_xcode4_workspace.lua")
-- CodeLite tests