blob: 453bf8f3afe47153208f5ec5d6daa911e5514f7b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
/*******************************************************************************
* Copyright (c) 2006, 2012 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.make.xlc.core.scannerconfig;
import org.eclipse.cdt.make.internal.core.scannerconfig2.GCCSpecsRunSIProvider;
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
import org.eclipse.cdt.managedbuilder.macros.BuildMacroException;
import org.eclipse.cdt.managedbuilder.macros.IBuildMacroProvider;
import org.eclipse.core.runtime.Path;
/**
* @author laggarcia
*
*/
public class XlCSpecsRunSIProvider extends GCCSpecsRunSIProvider {
protected static final String EMPTY_STRING = ""; //$NON-NLS-1$
/*
* (non-Javadoc)
*
* @see org.eclipse.cdt.make.internal.core.scannerconfig2.GCCSpecsRunSIProvider#initialize()
*/
@Override
protected boolean initialize() {
boolean rc = super.initialize();
if (rc) {
try {
this.fCompileCommand = new Path(ManagedBuildManager.getBuildMacroProvider().resolveValue(
this.fCompileCommand.toString(), EMPTY_STRING, null, IBuildMacroProvider.CONTEXT_CONFIGURATION,
ManagedBuildManager.getBuildInfo(this.resource.getProject()).getDefaultConfiguration()));
} catch (BuildMacroException e) {
e.printStackTrace();
return false;
}
}
return rc;
}
}
|