Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Extension point for contributing command line args?

In Objectiveclipse, I've set up a tool that presents a -framework argument, which works well. But this is only available on Mac OS X platforms.

http://code.google.com/p/objectiveclipse/source/browse/trunk/org.eclipse.cdt.objc.core/plugin.xml

<tool id="cdt.managedbuild.tool.macosx.objc.linker" name="%objc.linker.name" superClass="cdt.managedbuild.tool.macosx.c.linker"> <optionCategory owner="cdt.managedbuild.tool.macosx.objc.linker" name="%objc.frameworks.name" id="cdt.managedbuild.tool.macosx.objc.linker.frameworks">
                        </optionCategory>
                        <option name="%objc.frameworks.name"
category="cdt.managedbuild.tool.macosx.objc.linker.frameworks" command="-framework ${VALUE}" id="cdt.managedbuild.tool.macosx.objc.linker.framework"
                                valueType="stringList">
                                <listOptionValue value="Foundation" />
                        </option>
                </tool>

What I'd like to do instead is have a concept of a project-level variable 'frameworks', and then provide a way of mapping that into command line extensions. This will allow the Mac toolchain to add - framework Foo, but when running on Linux, supply a command line of (say) -l OpenGL -L /System/Library/Frameworks/OpenGL.framework.

What is the best way of integrating this into the way that CDT stores data? I have a suspicion that I could add an entry into ICConfigurationDescription and use that as the store for this list. But then, how to translate that into entries for the command line is something I'm not too sure about.

Alex


Back to the top