Files
cappuccino/AppKit/Themes/BlendKit/Jakefile
T
Martin CarlbergandGitHub 1c866931f3 New: The compiler will now create warnings for variables that are never read (#2871)
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.
2020-02-21 14:29:48 +01:00

38 lines
1.4 KiB
JavaScript

require("../../../common.jake");
var framework = require("objective-j/jake").framework;
var BundleTask = require("objective-j/jake").BundleTask;
blendKitTask = framework ("BlendKit", function(blendKitTask)
{
blendKitTask.setBuildIntermediatesPath(FILE.join($BUILD_DIR, "BlendKit.build", $CONFIGURATION))
blendKitTask.setBuildPath(FILE.join($BUILD_DIR, $CONFIGURATION));
blendKitTask.setIdentifier("com.280n.BlendKit");
blendKitTask.setVersion(getCappuccinoVersion());
blendKitTask.setAuthor("280 North, Inc.");
blendKitTask.setEmail("feedback @nospam@ 280north.com");
blendKitTask.setSummary("BlendKit classes for Cappuccino");
blendKitTask.setSources(FILE.glob("*.j"));
blendKitTask.setResources(FILE.glob("Resources/*"));
blendKitTask.setLicense(BundleTask.License.LGPL_v2_1);
blendKitTask.setFlattensSources(true); // FIXME: how do we non flatten?
if ($CONFIGURATION === "Release")
blendKitTask.setCompilerFlags("-O2 -Wno-unused-but-set-variable");
else
blendKitTask.setCompilerFlags("-DDEBUG -g -Wno-unused-but-set-variable");
});
$BUILD_CJS_PRODUCT_BLENDKIT = FILE.join($BUILD_CJS_CAPPUCCINO_FRAMEWORKS, "BlendKit");
filedir ($BUILD_CJS_PRODUCT_BLENDKIT, ["BlendKit"], function()
{
cp_r(blendKitTask.buildProductPath(), $BUILD_CJS_PRODUCT_BLENDKIT);
});
task ("build", ["BlendKit", $BUILD_CJS_PRODUCT_BLENDKIT]);
CLOBBER.include( $BUILD_CJS_PRODUCT_BLENDKIT);