[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-dev] Is there way to add to Symbols without adding to -D option of the project
|
Hi,
I am trying to add Symbols in C/C++ Paths and Symbols. However the same is
getting added to -D option. I just want to add the Symbols for the Editor
parser to understand these macros but not want it to be passed to the
compiler with -D option as our custom compiler sets these macros/Symbols
internally while compiling. is there a way i could achieve this? My code as
of now is as below:
ICLanguageSettingEntry[] oldMacroSettings =
lang.getSettingEntries(ICSettingEntry.MACRO);
ArrayList<ICLanguageSettingEntry> newMacroSettings = new
ArrayList<ICLanguageSettingEntry>();
newMacroSettings.addAll(Arrays.asList(oldMacroSettings));
// Add all Macros
newMacroSettings.add(new CMacroEntry(_MACRO_, "1", 0));
....
if (newMacroSettings.size() > 0)
lang.setSettingEntries(ICSettingEntry.MACRO,
newMacroSettings);
try {
CoreModel.getDefault().setProjectDescription(project,
projectDescription);
} catch (CoreException e) {
e.printStackTrace();
}
ManagedBuildManager.saveBuildInfo(project, true);
--
View this message in context: http://eclipse.1072660.n5.nabble.com/Is-there-way-to-add-to-Symbols-without-adding-to-D-option-of-the-project-tp166900.html
Sent from the Eclipse CDT - Development mailing list archive at Nabble.com.