mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-30 07:23:36 +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.
69 lines
2.7 KiB
JavaScript
69 lines
2.7 KiB
JavaScript
/*
|
|
* Jakefile
|
|
* Foundation
|
|
*
|
|
* Created by Francisco Tolmasky.
|
|
* Copyright 2009, 280 North, Inc.
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
*/
|
|
|
|
require("../common.jake");
|
|
|
|
var framework = require("objective-j/jake").framework;
|
|
var BundleTask = require("objective-j/jake").BundleTask;
|
|
|
|
foundationTask = framework ("Foundation", function(foundationTask)
|
|
{
|
|
foundationTask.setBuildIntermediatesPath(FILE.join($BUILD_DIR, "Foundation.build", $CONFIGURATION))
|
|
foundationTask.setBuildPath($BUILD_CONFIGURATION_DIR);
|
|
|
|
foundationTask.setAuthor("280 North, Inc.");
|
|
foundationTask.setEmail("feedback @nospam@ 280north.com");
|
|
foundationTask.setSummary("Foundation classes for Cappuccino");
|
|
foundationTask.setIdentifier("com.280n.Foundation");
|
|
foundationTask.setVersion(getCappuccinoVersion());
|
|
foundationTask.setLicense(BundleTask.License.LGPL_v2_1);
|
|
foundationTask.setSources(new FileList("**/*.j"));
|
|
foundationTask.setResources(new FileList("Resources/**/*"));
|
|
foundationTask.setFlattensSources(true);
|
|
foundationTask.setInfoPlistPath("Info.plist");
|
|
foundationTask.setEnvironments(require("objective-j/jake/environment").ObjJ);
|
|
|
|
// Grab all the .h's and just include them in each file.
|
|
var INCLUDES = new FileList("**/*.h").map(function(aFilename)
|
|
{
|
|
return "--include \"" + aFilename + "\"";
|
|
}).join(" ");
|
|
|
|
INCLUDES = "--include \"../AppKit/Platform/Platform.h\" " + INCLUDES;
|
|
|
|
if ($CONFIGURATION === "Release")
|
|
foundationTask.setCompilerFlags("-O2 -Wno-unused-but-set-variable " + INCLUDES);
|
|
else
|
|
foundationTask.setCompilerFlags("-DDEBUG -g -S --inline-msg-send -Wno-unused-but-set-variable " + INCLUDES);
|
|
});
|
|
|
|
$BUILD_CJS_FOUNDATION = FILE.join($BUILD_CJS_CAPPUCCINO_FRAMEWORKS, "Foundation");
|
|
|
|
filedir ($BUILD_CJS_FOUNDATION, ["Foundation"], function()
|
|
{
|
|
cp_r(foundationTask.buildProductPath(), $BUILD_CJS_FOUNDATION);
|
|
});
|
|
|
|
task ("build", ["Foundation", $BUILD_CJS_FOUNDATION]);
|
|
|
|
CLOBBER.include($BUILD_CJS_FOUNDATION);
|