1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-21 21:52:10 +02:00

bug 402412: IllegalArgumentException during build of Makefile Project

This commit is contained in:
Andrew Gvozdev 2013-03-29 16:41:03 -04:00
parent 9945f84a04
commit ae409bedd6

View file

@ -719,7 +719,18 @@ public abstract class AbstractLanguageSettingsOutputScanner extends LanguageSett
// try path relative to build dir from configuration
if (sourceFile == null && currentCfgDescription != null) {
IPath builderCWD = currentCfgDescription.getBuildSetting().getBuilderCWD();
if (builderCWD!=null) {
if (builderCWD != null) {
String strBuilderCWD = builderCWD.toString();
try {
ICdtVariableManager varManager = CCorePlugin.getDefault().getCdtVariableManager();
strBuilderCWD = varManager.resolveValue(strBuilderCWD, "", null, currentCfgDescription); //$NON-NLS-1$
} catch (Exception e) {
@SuppressWarnings("nls")
String msg = "Exception trying to resolve value [" + strBuilderCWD + "]";
ManagedBuilderCorePlugin.log(new Status(IStatus.ERROR, ManagedBuilderCorePlugin.PLUGIN_ID, msg, e));
}
builderCWD = new Path(strBuilderCWD);
IPath path = builderCWD.append(parsedResourceName);
URI uri = org.eclipse.core.filesystem.URIUtil.toURI(path);
sourceFile = findFileForLocationURI(uri, currentProject, /*checkExistence*/ true);