mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 13:07:02 +00:00
This new warning adds a lot of warnings in the Cappuccino frameworks. I have turned off the warning in the Jakefiles when compiling most of the Cappuccino frameworks. But it is on as default for any user projects. So there is also a new feature to turn off/on warnings as a compiler flag. These flags are (all flags are on as default): -Wunused-but-set-variable Warning when a local variable is never read. -Wshadow-ivar Warning when a local variable is shadowing an instance variable for the class. -Wcreate-global-inside-function-or-method Warning when creating a global variable inside a function or method. -Wunknown-class-or-global Warning when a class or global variable is not known. -Wunknown-ivar-type Warning when the type for an instance variable is not known. To turn off a flag add a 'no-' prefix. Example: -Wno-unused-but-set-variable For an example how to use it in a Jakefile please look at the Jakefiles in this commit.
66 lines
2.8 KiB
JavaScript
66 lines
2.8 KiB
JavaScript
|
|
require("../common.jake");
|
|
|
|
var framework = require("objective-j/jake").framework,
|
|
BundleTask = require("objective-j/jake").BundleTask;
|
|
|
|
$BUILD_PATH = FILE.join($BUILD_DIR, $CONFIGURATION, 'AppKit');
|
|
|
|
AppKitFiles = new FileList("**/*.j").exclude('CoreGraphics/CGContextCanvas.j', 'CoreGraphics/CGContextVML.j', 'Themes/**/*', 'Tools/**/*', "Platform/DOM/CPPlatform.j", "Platform/DOM/CPPlatformString.j");
|
|
|
|
FIXME_fileDependency (FILE.join("Platform", "CPPlatform.j"), FILE.join("Platform", "DOM", "CPPlatform.j"));
|
|
FIXME_fileDependency (FILE.join("Platform", "CPPlatformString.j"), FILE.join("Platform", "DOM", "CPPlatformString.j"));
|
|
|
|
appKitTask = framework ("AppKit", function(appKitTask)
|
|
{
|
|
appKitTask.setBuildIntermediatesPath(FILE.join($BUILD_DIR, "AppKit.build", $CONFIGURATION))
|
|
appKitTask.setBuildPath($BUILD_CONFIGURATION_DIR);
|
|
|
|
appKitTask.setAuthor("280 North, Inc.");
|
|
appKitTask.setEmail("feedback @nospam@ 280north.com");
|
|
appKitTask.setSummary("AppKit classes for Cappuccino");
|
|
appKitTask.setIdentifier("com.280n.AppKit");
|
|
appKitTask.setVersion(getCappuccinoVersion());
|
|
appKitTask.setLicense(BundleTask.License.LGPL_v2_1);
|
|
appKitTask.setSources(AppKitFiles);
|
|
appKitTask.setResources(new FileList("Resources/**/*"));
|
|
appKitTask.setFlattensSources(true);
|
|
appKitTask.setInfoPlistPath("Info.plist");
|
|
|
|
// Grab all the .h's and just include them in each file.
|
|
var INCLUDES = new FileList("**/*.h").map(function(aFilename)
|
|
{
|
|
return "--include \"" + aFilename + "\"";
|
|
}).join(" ");
|
|
|
|
if ($CONFIGURATION === "Release") {
|
|
appKitTask.setCompilerFlags("-O2 -Wno-unused-but-set-variable " + INCLUDES);
|
|
}
|
|
else
|
|
appKitTask.setCompilerFlags("-DDEBUG -g -S --inline-msg-send -Wno-unused-but-set-variable " + INCLUDES);
|
|
});
|
|
|
|
$BUILD_CJS_CAPPUCCINO_APPKIT = FILE.join($BUILD_CJS_CAPPUCCINO_FRAMEWORKS, "AppKit");
|
|
|
|
filedir ($BUILD_CJS_CAPPUCCINO_APPKIT, ["AppKit"], function()
|
|
{
|
|
cp_r(appKitTask.buildProductPath(), $BUILD_CJS_CAPPUCCINO_APPKIT);
|
|
});
|
|
|
|
subtasks (["Themes"], ["clean", "clobber"]);
|
|
|
|
task ("Theme", [$BUILD_CJS_CAPPUCCINO_APPKIT], function()
|
|
{
|
|
subjake(["Themes"], "build");
|
|
|
|
cp_r(FILE.join($BUILD_DIR, $CONFIGURATION, 'Aristo.blend'), FILE.join($BUILD_PATH, 'Resources', 'Aristo.blend'));
|
|
cp_r(FILE.join($BUILD_DIR, $CONFIGURATION, 'Aristo.blend'), FILE.join($BUILD_CJS_CAPPUCCINO_APPKIT, "Resources", "Aristo.blend"));
|
|
|
|
cp_r(FILE.join($BUILD_DIR, $CONFIGURATION, 'Aristo2.blend'), FILE.join($BUILD_PATH, 'Resources', 'Aristo2.blend'));
|
|
cp_r(FILE.join($BUILD_DIR, $CONFIGURATION, 'Aristo2.blend'), FILE.join($BUILD_CJS_CAPPUCCINO_APPKIT, "Resources", "Aristo2.blend"));
|
|
});
|
|
|
|
task ("build", ["AppKit", $BUILD_CJS_CAPPUCCINO_APPKIT, "Theme"]);
|
|
|
|
CLOBBER.include($BUILD_CJS_CAPPUCCINO_APPKIT);
|