Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Initial CMake work

Hey gang,

I want to describe the patch I have up waiting to check in but don’t really want to put it in a wiki since it’s likely to change rapidly over the next few weeks. So I’ll do it here. If you’re not interested, you can stop reading now :).

There are two new plugins, org.eclipse.cdt.cmake.core and org.eclipse.cdt.cmake.ui, and a feature for them.

The initial commit supports creating a very simple project with a single source file with a main in it and the minimal CMakeLists.txt file. It supports building for Run on the Local machine. That’s what the default build config generally does with the new system. The UI plug-in just has the new project wizard. All the goodies are in the Core plug-in and here’s a roadmap to what’s there.

CMakeProjectGenerator - generates the two files I mentioned using freemarker and hooks up the nature and builder. The source file is in a sourceFolder.
CMakeTemplateGenerator - the bridge to freemarker. Might push this down later to the build.core.
CMakeNature - the nature drives the builder
CMakeBuilder - calls cmake and then make and outputs to the new console. It gets the build directory and toolchain environment from the build configuration.
CMakeBuildConfiguration - manages the build folder and provides the entry for scanner info. It’ll do more later like managing CMake options.
CMakeBuildConfigurationFactory - manages the mapping from IBuildConfiguration to CMakeBuildConfiguration
CMakeScannerInfoProvider - the provider registered against our builder that the cdt.core uses to get scanner info.
CMakeLaunchDescriptorType - sets up the CMakeLaunchDescriptor mapping to our CMake projects using the nature.
CMakeLocalRunLaunchConfigDelegate - the delegate for ‘run’ mode for Local launch targets for CMake projects. For now, just hooks things up so buildForLaunch builds our project. Later it will also manage setting the active build configuration for this combination. But it works now since run on local is the default.
CMakeLocalLaunchConfigurationProvider - maps the CMake launch descriptor and Local launch target to our launch configuration.

That’s all there is. As I hinted at in my last e-mail, I cut n pasted a lot from the Qt version of this which tells me there are a few things I should push down to build.core. Funny enough, one of those things is a shared launch configuration. I may just rename build.core to something like buildForLaunch.core since they are really tied together to make this sweet workflow.

Ask lots of questions. We still need to figure out next steps and all and how to make this work for multiple target types and different generators and such.
Cheers,
Doug.

Back to the top