From 512925a8128dd9f261d0ee48d7f78043d11268d8 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Wed, 25 Dec 2013 20:16:14 +0100 Subject: [PATCH] IDE warns if a library is compiled with an unsupported architecture --- app/src/processing/app/debug/Compiler.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/src/processing/app/debug/Compiler.java b/app/src/processing/app/debug/Compiler.java index 8abb1ee04..12641e709 100644 --- a/app/src/processing/app/debug/Compiler.java +++ b/app/src/processing/app/debug/Compiler.java @@ -101,6 +101,18 @@ public class Compiler implements MessageConsumer { } if (verbose) System.out.println(); + + String arch = Base.getTargetPlatform().getId(); + for (Library lib : sketch.getImportedLibraries()) { + if (!lib.supportsArchitecture(arch)) { + System.err.println(I18n + .format(_("WARNING: library {0} claims to run on {1} " + + "architecture(s) and may be incompatible with your" + + " current board which runs on [{2}] architecture."), lib + .getName(), lib.getArchitectures(), arch)); + System.err.println(); + } + } // 1. compile the sketch (already in the buildPath) sketch.setCompilingProgress(30);