Completed CMake integration in the Yocto IDE
cover Completed CMake integration in the Yocto IDE
From: Atanas Gegov <[email protected]>
Hi,
this patch series adds a new plugin containing a CMake configure tool, a toolchain and a project type for building CMake projects in the Yocto IDE. The plugin also introduces Hello World templates for C and C++. With this patch series the CMake integration is completed and the CMake projects can be built, debugged etc. as already known from the Autotools-based projects.
Cheers,
Atanas
P.S: This patch series requires the already discussed patch series "[eclipse-poky][RFCv2 0/7] Introducing a YoctoSDKCMakeProjectNature".
Atanas Gegov (13):
plugins/cmake: Added an empty CMake integration plugin plugins/cmake: Defined CMake tool with options plugins/sdk.ide: Added a method to get project environment plugins/cmake: Preparing a configure Job plugins/cmake: Added run method to configure Job plugins/cmake: Added a Makefile generator plugins/cmake: Added the generation of toolchain.cmake plugins/cmake: Defined the building toolchain plugins/cmake: Added a new category for CMake projects plugins/cmake: Connect toolchain and new project category plugins/cmake: Added CMake template projects plugins/sdk.ide: Adapted RemoteDebugLauncher for CMake projects features/sdk: Added CMake plugin to sdk feature
features/org.yocto.sdk/feature.xml | 6 + plugins/org.yocto.cmake.managedbuilder/.classpath | 7 + plugins/org.yocto.cmake.managedbuilder/.project | 28 ++ .../.settings/org.eclipse.jdt.core.prefs | 8 + .../META-INF/MANIFEST.MF | 16 ++ .../OSGI-INF/l10n/bundle.properties | 40 +++ .../build.properties | 7 + plugins/org.yocto.cmake.managedbuilder/plugin.xml | 283 ++++++++++++++++++++ .../org/yocto/cmake/managedbuilder/Activator.java | 50 ++++ .../YoctoCMakeMakefileGenerator.java | 281 +++++++++++++++++++ .../cmake/managedbuilder/YoctoCMakeMessages.java | 57 ++++ .../managedbuilder/YoctoCMakeMessages.properties | 27 ++ .../managedbuilder/job/ExecuteConfigureJob.java | 149 +++++++++++ .../cmake/managedbuilder/util/ConsoleUtility.java | 49 ++++ .../cmake/managedbuilder/util/SystemProcess.java | 118 ++++++++ .../HelloWorldCCMakeProject/src/CMakeLists.txt | 34 +++ .../HelloWorldCCMakeProject/src/main.c | 21 ++ .../HelloWorldCCMakeProject/template.properties | 31 +++ .../HelloWorldCCMakeProject/template.xml | 61 +++++ .../HelloWorldCPPCMakeProject/src/CMakeLists.txt | 34 +++ .../HelloWorldCPPCMakeProject/src/main.cpp | 21 ++ .../HelloWorldCPPCMakeProject/template.properties | 31 +++ .../HelloWorldCPPCMakeProject/template.xml | 61 +++++ .../src/org/yocto/sdk/ide/utils/YoctoSDKUtils.java | 29 +- 24 files changed, 1445 insertions(+), 4 deletions(-) create mode 100644 plugins/org.yocto.cmake.managedbuilder/.classpath create mode 100644 plugins/org.yocto.cmake.managedbuilder/.project create mode 100644 plugins/org.yocto.cmake.managedbuilder/.settings/org.eclipse.jdt.core.prefs create mode 100644 plugins/org.yocto.cmake.managedbuilder/META-INF/MANIFEST.MF create mode 100644 plugins/org.yocto.cmake.managedbuilder/OSGI-INF/l10n/bundle.properties create mode 100644 plugins/org.yocto.cmake.managedbuilder/build.properties create mode 100644 plugins/org.yocto.cmake.managedbuilder/plugin.xml create mode 100644 plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/Activator.java create mode 100644 plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/YoctoCMakeMakefileGenerator.java create mode 100644 plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/YoctoCMakeMessages.java create mode 100644 plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/YoctoCMakeMessages.properties create mode 100644 plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/job/ExecuteConfigureJob.java create mode 100644 plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/util/ConsoleUtility.java create mode 100644 plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/util/SystemProcess.java create mode 100644 plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCCMakeProject/src/CMakeLists.txt create mode 100644 plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCCMakeProject/src/main.c create mode 100644 plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCCMakeProject/template.properties create mode 100644 plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCCMakeProject/template.xml create mode 100644 plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCPPCMakeProject/src/CMakeLists.txt create mode 100644 plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCPPCMakeProject/src/main.cpp create mode 100644 plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCPPCMakeProject/template.properties create mode 100644 plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCPPCMakeProject/template.xml
Signature · 1 line
1.7.9.5
PATCH 1/13 plugins/cmake: Added an empty CMake integration plugin
From: Atanas Gegov <[email protected]>
This plugin will implement the CMake managed
builder (CMake toolchain for Eclipse) and will
also provide CMake template projects.
--- plugins/org.yocto.cmake.managedbuilder/.classpath | 7 +++ plugins/org.yocto.cmake.managedbuilder/.project | 28 ++++++++++ .../.settings/org.eclipse.jdt.core.prefs | 8 +++ .../META-INF/MANIFEST.MF | 16 ++++++ .../OSGI-INF/l10n/bundle.properties | 13 +++++ .../build.properties | 6 +++ plugins/org.yocto.cmake.managedbuilder/plugin.xml | 4 ++ .../org/yocto/cmake/managedbuilder/Activator.java | 50 +++++++++++++++++ .../cmake/managedbuilder/YoctoCMakeMessages.java | 57 ++++++++++++++++++++ 9 files changed, 189 insertions(+) create mode 100644 plugins/org.yocto.cmake.managedbuilder/.classpath create mode 100644 plugins/org.yocto.cmake.managedbuilder/.project create mode 100644 plugins/org.yocto.cmake.managedbuilder/.settings/org.eclipse.jdt.core.prefs create mode 100644 plugins/org.yocto.cmake.managedbuilder/META-INF/MANIFEST.MF create mode 100644 plugins/org.yocto.cmake.managedbuilder/OSGI-INF/l10n/bundle.properties create mode 100644 plugins/org.yocto.cmake.managedbuilder/build.properties create mode 100644 plugins/org.yocto.cmake.managedbuilder/plugin.xml create mode 100644 plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/Activator.java create mode 100644 plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/YoctoCMakeMessages.java
plugins/org.yocto.cmake.managedbuilder/.classpath new file +7 -0
@@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="output" path="bin"/> +</classpath>
plugins/org.yocto.cmake.managedbuilder/.project new file +28 -0
@@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.yocto.cmake.managedbuilder</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription>
plugins/org.yocto.cmake.managedbuilder/.settings/org.eclipse.jdt.core.prefs new file +8 -0
@@ -0,0 +1,8 @@ +#Wed Jul 14 11:43:59 CEST 2010 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.6
plugins/org.yocto.cmake.managedbuilder/META-INF/MANIFEST.MF new file +16 -0
@@ -0,0 +1,16 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %Bundle-Name +Bundle-SymbolicName: org.yocto.cmake.managedbuilder;singleton:=true +Bundle-Version: 1.4.0.qualifier +Bundle-Activator: org.yocto.cmake.managedbuilder.Activator +Bundle-Vendor: %Bundle-Vendor +Require-Bundle: org.eclipse.cdt.managedbuilder.core, + org.eclipse.cdt.core;bundle-version="5.2.1", + org.eclipse.core.resources;bundle-version="3.6.0", + org.eclipse.core.runtime;bundle-version="3.6.0", + org.eclipse.ui.console;bundle-version="3.5.0", + org.eclipse.ui;bundle-version="3.6.2", + org.yocto.sdk.ide +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Bundle-ActivationPolicy: lazy
plugins/org.yocto.cmake.managedbuilder/OSGI-INF/l10n/bundle.properties new file +13 -0
@@ -0,0 +1,13 @@ +#/******************************************************************************* +# * Copyright (c) 2013 BMW Car IT GmbH. +# * All rights reserved. This program and the accompanying materials +# * are made available under the terms of the Eclipse Public License v1.0 +# * which accompanies this distribution, and is available at +# * http://www.eclipse.org/legal/epl-v10.html +# * +# * Contributors: +# * BMW Car IT - initial implementation +# *******************************************************************************/ + +Bundle-Vendor = yoctoproject.org +Bundle-Name = Yocto CMake Plugin
plugins/org.yocto.cmake.managedbuilder/build.properties new file +6 -0
@@ -0,0 +1,6 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + OSGI-INF/
plugins/org.yocto.cmake.managedbuilder/plugin.xml new file +4 -0
@@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.4"?> +<plugin> +</plugin>
plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/Activator.java new file +50 -0
50 lines not on this page · raw message
plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/YoctoCMakeMessages.java new file +57 -0
57 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH 2/13 plugins/cmake: Defined CMake tool with options
In reply to Atanas GegovFrom: Atanas Gegov <[email protected]>
Defined a tool using the cmake command with some options and a free text-field for custom options. This tool will become part of the builder toolchain for building CMake projects.
--- .../OSGI-INF/l10n/bundle.properties | 14 +++ plugins/org.yocto.cmake.managedbuilder/plugin.xml | 102 ++++++++++++++++++++ 2 files changed, 116 insertions(+)
plugins/org.yocto.cmake.managedbuilder/OSGI-INF/l10n/bundle.properties +14 -0
@@ -11,3 +11,17 @@ Bundle-Vendor = yoctoproject.org Bundle-Name = Yocto CMake Plugin + +# Extension name +extension.name=Yocto CMake Managed Builder + +# CMake configure +cmakeconfigure.name=CMake configure +cmakeconfigure.options=CMake Options +cmakeconfigure.sourcepath=Relative source path +cmakeconfigure.toolchaincmakefilepath=Relative toolchain.cmake path +cmakeconfigure.debugsymbols=Compile with debug symbols +cmakeconfigure.verbosemakefile=Generate verbose Makefiles +cmakeconfigure.wdev=Enable developer warnings (-Wdev) +cmakeconfigure.wnodev=Suppress developer warnings (-Wno-dev) +cmakeconfigure.otherflags=Other flags
plugins/org.yocto.cmake.managedbuilder/plugin.xml +102 -0
106 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH 3/13 plugins/sdk.ide: Added a method to get project environment
In reply to Atanas GegovFrom: Atanas Gegov <[email protected]>
This methods creates a key-value map from the
project environment. It can be used to provide
this environment to new processes.
--- .../src/org/yocto/sdk/ide/utils/YoctoSDKUtils.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/utils/YoctoSDKUtils.java +16 -0
@@ -8,6 +8,7 @@ * Contributors: * Intel - initial API and implementation * BMW Car IT - add methods to use different preference stores + * Atanas Gegov (BMW Car IT) - add method to get the project environment *******************************************************************************/ package org.yocto.sdk.ide.utils;
@@ -87,6 +88,21 @@ public class YoctoSDKUtils { return var.getValue(); } + public static Map<String,String> getEnvVariablesAsMap (IProject project) { + Map<String, String> result = new HashMap<String, String>(); + + ICProjectDescription cpdesc = CoreModel.getDefault().getProjectDescription(project, true); + ICConfigurationDescription ccdesc = cpdesc.getActiveConfiguration(); + IEnvironmentVariableManager manager = CCorePlugin.getDefault().getBuildEnvironmentManager(); + IContributedEnvironment env = manager.getContributedEnvironment(); + + for(IEnvironmentVariable var : env.getVariables(ccdesc)) { + result.put(var.getName(), var.getValue()); + } + + return result; + } + /* Save project wide settings into ENV VARs including POKY preference settings * and Environment Script File export VARs */
Signature · 1 line
1.7.9.5
PATCH 4/13 plugins/cmake: Preparing a configure Job
In reply to Atanas GegovFrom: Atanas Gegov <[email protected]>
This job will execute the configure step for the CMake projects. It uses the command defined by the CMake tool ("cmake") and gets the provided options from the user to assemble the command line.
--- .../managedbuilder/YoctoCMakeMessages.properties | 18 +++ .../managedbuilder/job/ExecuteConfigureJob.java | 124 ++++++++++++++++++++ .../cmake/managedbuilder/util/SystemProcess.java | 118 +++++++++++++++++++ 3 files changed, 260 insertions(+) create mode 100644 plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/YoctoCMakeMessages.properties create mode 100644 plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/job/ExecuteConfigureJob.java create mode 100644 plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/util/SystemProcess.java
plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/YoctoCMakeMessages.properties new file +18 -0
@@ -0,0 +1,18 @@ +#/******************************************************************************* +# * Copyright (c) 2013 BMW Car IT GmbH. +# * All rights reserved. This program and the accompanying materials +# * are made available under the terms of the Eclipse Public License v1.0 +# * which accompanies this distribution, and is available at +# * http://www.eclipse.org/legal/epl-v10.html +# * +# * Contributors: +# * BMW Car IT - initial implementation +# *******************************************************************************/ + +# Job +ExecuteConfigureJob.runConfigure=Running configure +ExecuteConfigureJob.consoleName=Configure using CMake [{0}] +ExecuteConfigureJob.buildingMakefile=Building Makefile +ExecuteConfigureJob.warning.aborted=Build of project has been aborted +ExecuteConfigureJob.error.couldNotStart=Build of project could not be started +ExecuteConfigureJob.error.buildFailed=Build of project failed
plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/job/ExecuteConfigureJob.java new file +124 -0
124 lines not on this page · raw message
plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/util/SystemProcess.java new file +118 -0
118 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH 5/13 plugins/cmake: Added run method to configure Job
In reply to Atanas GegovFrom: Atanas Gegov <[email protected]>
The job executes the configure step of the project using the "cmake" command. The output is presented in a new console.
--- .../managedbuilder/job/ExecuteConfigureJob.java | 25 ++++++++++ .../cmake/managedbuilder/util/ConsoleUtility.java | 49 ++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/util/ConsoleUtility.java
plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/job/ExecuteConfigureJob.java +25 -0
@@ -92,6 +92,31 @@ public class ExecuteConfigureJob extends Job { */ @Override protected IStatus run(IProgressMonitor monitor) { + monitor.beginTask( + YoctoCMakeMessages.getString("ExecuteConfigureJob.runConfigure"), 20); //$NON-NLS-1$ + + IOConsoleOutputStream cos = + ConsoleUtility.getConsoleOutput(YoctoCMakeMessages.getFormattedString("ExecuteConfigureJob.consoleName", //$NON-NLS-1$ + project.getName())); + monitor.worked(1); + + try { + return buildProject(monitor, cos); + } catch (IOException e) { + return new Status(Status.ERROR, + Activator.PLUGIN_ID, Status.OK, + YoctoCMakeMessages.getString("ExecuteConfigureJob.error.couldNotStart"), e); //$NON-NLS-1$ + } catch (InterruptedException e) { + return new Status(Status.WARNING, + Activator.PLUGIN_ID, + YoctoCMakeMessages.getString("ExecuteConfigureJob.warning.aborted")); //$NON-NLS-1$ + } finally { + try { + cos.close(); + } catch (IOException e) { + cos = null; + } + } } private IStatus buildProject(IProgressMonitor monitor,
plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/util/ConsoleUtility.java new file +49 -0
49 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH 6/13 plugins/cmake: Added a Makefile generator
In reply to Atanas GegovFrom: Atanas Gegov <[email protected]>
Defined a ManagedBuilder and a correspondingMakefile generator class. In order to create
Makefiles the cmake configure job is run. By now
it is assumed that the required toolchain.cmake
file is provided by the user. The next patch adds
the toolchain.cmake generation.
--- .../OSGI-INF/l10n/bundle.properties | 3 + plugins/org.yocto.cmake.managedbuilder/plugin.xml | 9 + .../YoctoCMakeMakefileGenerator.java | 174 ++++++++++++++++++++ .../managedbuilder/YoctoCMakeMessages.properties | 9 + 4 files changed, 195 insertions(+) create mode 100644 plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/YoctoCMakeMakefileGenerator.java
plugins/org.yocto.cmake.managedbuilder/OSGI-INF/l10n/bundle.properties +3 -0
@@ -15,6 +15,9 @@ Bundle-Name = Yocto CMake Plugin # Extension name extension.name=Yocto CMake Managed Builder +# Builder +builder.name=Yocto CMake Environment Builder + # CMake configure cmakeconfigure.name=CMake configure cmakeconfigure.options=CMake Options
plugins/org.yocto.cmake.managedbuilder/plugin.xml +9 -0
@@ -8,6 +8,15 @@ <managedBuildRevision fileVersion="4.0.0"> </managedBuildRevision> + <builder + id="org.yocto.cmake.managedbuilder.builder" + name="%builder.name" + buildfileGenerator="org.yocto.cmake.managedbuilder.YoctoCMakeMakefileGenerator" + cleanBuildTarget="clean" + command="make" + isVariableCaseSensitive="false" + supportsManagedBuild="true"> + </builder> <tool id="org.yocto.cmake.managedbuilder.cmakeconfigure" name="%cmakeconfigure.name"
plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/YoctoCMakeMakefileGenerator.java new file +174 -0
174 lines not on this page · raw message
plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/YoctoCMakeMessages.properties +9 -0
@@ -16,3 +16,12 @@ ExecuteConfigureJob.buildingMakefile=Building Makefile ExecuteConfigureJob.warning.aborted=Build of project has been aborted ExecuteConfigureJob.error.couldNotStart=Build of project could not be started ExecuteConfigureJob.error.buildFailed=Build of project failed + +# File generator +YoctoCMakeMakefileGenerator.configureJob.name=Configuring project +YoctoCMakeMakefileGenerator.configure.creatingMakefiles=Generating Makefiles using CMake +YoctoCMakeMakefileGenerator.cancel.missingCMakeList=CMakeLists.txt file is missing +YoctoCMakeMakefileGenerator.creatingBuildDirectory=Creating build directory +YoctoCMakeMakefileGenerator.error.makeFileGenerationFailed=Makefile generation failed during configuration process +YoctoCMakeMakefileGenerator.ok.makefilesStillValid=Makefiles are still valid. +YoctoCMakeMakefileGenerator.removingCacheFiles=Removing cache files
Signature · 1 line
1.7.9.5
PATCH 7/13 plugins/cmake: Added the generation of toolchain.cmake
In reply to Atanas GegovFrom: Atanas Gegov <[email protected]>
The generation of the toolchain.cmake file happens just before the exectuion of the configure job. The current environment of the project is used to set the values in the toolchain.cmake file.
--- .../YoctoCMakeMakefileGenerator.java | 107 ++++++++++++++++++++ 1 file changed, 107 insertions(+)
plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/YoctoCMakeMakefileGenerator.java +107 -0
@@ -149,6 +149,8 @@ public class YoctoCMakeMakefileGenerator implements IManagedBuilderMakefileGener } monitor.setTaskName(taskName); + createToolchainCMakeFile(workingDir); + // Create the Makefiles by executing cmake ExecuteConfigureJob job = new ExecuteConfigureJob(
@@ -171,4 +173,109 @@ public class YoctoCMakeMakefileGenerator implements IManagedBuilderMakefileGener YoctoCMakeMessages.getString("YoctoCMakeMakefileGenerator.error.makeFileGenerationFailed")), null); //$NON-NLS-1$ } } + + private String createCMakeSetStatement(String variable, String value, String cacheOption) { + String setStatement = "set("; //$NON-NLS-1$ + setStatement += variable + " " + value; //$NON-NLS-1$ + if(cacheOption != null && !cacheOption.equals("")) { //$NON-NLS-1$ + setStatement += " " + cacheOption; //$NON-NLS-1$ + } + setStatement += ")\n"; //$NON-NLS-1$ + return setStatement; + } + + // Considered poky's cmake.bbclass for this method + private void createToolchainCMakeFile(IPath workingDir) { + String toolchainCMakeFileContentAsString = "# CMake system name must be something like \"Linux\".\n" + //$NON-NLS-1$ + "# This is important for cross-compiling.\n"; //$NON-NLS-1$ + + String targetArchValue = YoctoSDKUtils.getEnvValue(project, "TARGET_ARCH"); //$NON-NLS-1$ + toolchainCMakeFileContentAsString += createCMakeSetStatement("CMAKE_SYSTEM_PROCESSOR", targetArchValue, null); //$NON-NLS-1$ + + String oeCMakeCCompilerValue = YoctoSDKUtils.getEnvValue(project, "OECMAKE_C_COMPILER"); //$NON-NLS-1$ + toolchainCMakeFileContentAsString += createCMakeSetStatement("CMAKE_C_COMPILER", oeCMakeCCompilerValue, null); //$NON-NLS-1$ + + String oeCMakeCXXCompilerValue = YoctoSDKUtils.getEnvValue(project, "OECMAKE_CXX_COMPILER"); //$NON-NLS-1$ + toolchainCMakeFileContentAsString += createCMakeSetStatement("CMAKE_CXX_COMPILER", oeCMakeCXXCompilerValue, null); //$NON-NLS-1$ + + String oeCMakeCFlagsValue = YoctoSDKUtils.getEnvValue(project, "OECMAKE_C_FLAGS"); //$NON-NLS-1$ + toolchainCMakeFileContentAsString += createCMakeSetStatement("CMAKE_C_FLAGS", //$NON-NLS-1$ + "\"" + oeCMakeCFlagsValue + "\"", "CACHE STRING \"CFLAGS\""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + + String oeCMakeCXXFlagsValue = YoctoSDKUtils.getEnvValue(project, "OECMAKE_CXX_FLAGS"); //$NON-NLS-1$ + toolchainCMakeFileContentAsString += createCMakeSetStatement("CMAKE_CXX_FLAGS", //$NON-NLS-1$ + "\"" + oeCMakeCXXFlagsValue + "\"", "CACHE STRING \"CXXFLAGS\""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + + String oeCMakeCFlagsReleaseValue = YoctoSDKUtils.getEnvValue(project, "OECMAKE_C_FLAGS_RELEASE"); //$NON-NLS-1$ + toolchainCMakeFileContentAsString += createCMakeSetStatement("CMAKE_C_FLAGS_RELEASE", //$NON-NLS-1$ + "\"" + oeCMakeCFlagsReleaseValue + "\"", "CACHE STRING \"CFLAGS for release\""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + + String oeCMakeCXXFlagsReleaseValue = YoctoSDKUtils.getEnvValue(project, "OECMAKE_CXX_FLAGS_RELEASE"); //$NON-NLS-1$ + toolchainCMakeFileContentAsString += createCMakeSetStatement("CMAKE_CXX_FLAGS_RELEASE", //$NON-NLS-1$ + "\"" + oeCMakeCXXFlagsReleaseValue + "\"", "CACHE STRING \"CXXFLAGS for release\""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + + String oeCMakeCLinkFlagsValue = YoctoSDKUtils.getEnvValue(project, "OECMAKE_C_LINK_FLAGS"); //$NON-NLS-1$ + toolchainCMakeFileContentAsString += createCMakeSetStatement("CMAKE_C_LINK_FLAGS", //$NON-NLS-1$ + "\"" + oeCMakeCLinkFlagsValue + "\"", "CACHE STRING \"LDFLAGS\""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + + String oeCMakeCXXLinkFlagsValue = YoctoSDKUtils.getEnvValue(project, "OECMAKE_CXX_LINK_FLAGS"); //$NON-NLS-1$ + toolchainCMakeFileContentAsString += createCMakeSetStatement("CMAKE_CXX_LINK_FLAGS", //$NON-NLS-1$ + "\"" + oeCMakeCXXLinkFlagsValue + "\"", "CACHE STRING \"LDFLAGS\""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + + toolchainCMakeFileContentAsString += "\n"; //$NON-NLS-1$ + toolchainCMakeFileContentAsString += "# only search in the paths provided so cmake doesnt pick\n"; //$NON-NLS-1$ + toolchainCMakeFileContentAsString += "# up libraries and tools from the native build machine\n"; //$NON-NLS-1$ + + String findRootPathValue = YoctoSDKUtils.getEnvValue(project, "STAGING_DIR_HOST"); //$NON-NLS-1$ + findRootPathValue += " "; //$NON-NLS-1$ + findRootPathValue += YoctoSDKUtils.getEnvValue(project, "STAGING_DIR_NATIVE"); //$NON-NLS-1$ + findRootPathValue += " "; //$NON-NLS-1$ + findRootPathValue += YoctoSDKUtils.getEnvValue(project, "CROSS_DIR"); //$NON-NLS-1$ + findRootPathValue += " "; //$NON-NLS-1$ + findRootPathValue += YoctoSDKUtils.getEnvValue(project, "OECMAKE_PERLNATIVE_DIR"); //$NON-NLS-1$ + findRootPathValue += " "; //$NON-NLS-1$ + findRootPathValue += YoctoSDKUtils.getEnvValue(project, "OECMAKE_EXTRA_ROOT_PATH"); //$NON-NLS-1$ + findRootPathValue += " "; //$NON-NLS-1$ + findRootPathValue += YoctoSDKUtils.getEnvValue(project, "EXTERNAL_TOOLCHAIN"); //$NON-NLS-1$ + toolchainCMakeFileContentAsString += createCMakeSetStatement("CMAKE_FIND_ROOT_PATH", findRootPathValue, null); //$NON-NLS-1$ + + toolchainCMakeFileContentAsString += createCMakeSetStatement("CMAKE_FIND_ROOT_PATH_MODE_PROGRAM", "ONLY", null); //$NON-NLS-1$ //$NON-NLS-2$ + toolchainCMakeFileContentAsString += createCMakeSetStatement("CMAKE_FIND_ROOT_PATH_MODE_LIBRARY", "ONLY", null); //$NON-NLS-1$ //$NON-NLS-2$ + toolchainCMakeFileContentAsString += createCMakeSetStatement("CMAKE_FIND_ROOT_PATH_MODE_INCLUDE", "ONLY", null); //$NON-NLS-1$ //$NON-NLS-2$ + toolchainCMakeFileContentAsString += "\n"; //$NON-NLS-1$ + + toolchainCMakeFileContentAsString += "# Use qt.conf settings\n"; //$NON-NLS-1$ + toolchainCMakeFileContentAsString += createCMakeSetStatement("ENV{QT_CONF_PATH}", "qt.conf", null); //$NON-NLS-1$ //$NON-NLS-2$ + toolchainCMakeFileContentAsString += "\n"; //$NON-NLS-1$ + + toolchainCMakeFileContentAsString += "# We need to set the rpath to the correct directory as cmake does not provide any\n"; //$NON-NLS-1$ + toolchainCMakeFileContentAsString += "# directory as rpath by default\n"; //$NON-NLS-1$ + + String oeCMakeRPathValue = YoctoSDKUtils.getEnvValue(project, "OECMAKE_RPATH"); //$NON-NLS-1$ + toolchainCMakeFileContentAsString += createCMakeSetStatement("CMAKE_INSTALL_RPATH", oeCMakeRPathValue, null); //$NON-NLS-1$ + + toolchainCMakeFileContentAsString += "\n"; //$NON-NLS-1$ + toolchainCMakeFileContentAsString += "# Use native cmake modules\n"; //$NON-NLS-1$ + + String stagingDatadirValue = YoctoSDKUtils.getEnvValue(project, "STAGING_DATADIR"); //$NON-NLS-1$ + toolchainCMakeFileContentAsString += createCMakeSetStatement("CMAKE_MODULE_PATH", //$NON-NLS-1$ + stagingDatadirValue + "/cmake/Modules/", null); //$NON-NLS-1$ + + toolchainCMakeFileContentAsString += "\n"; //$NON-NLS-1$ + toolchainCMakeFileContentAsString += "# add for non /usr/lib libdir, e.g. /usr/lib64\n"; //$NON-NLS-1$ + toolchainCMakeFileContentAsString += createCMakeSetStatement("CMAKE_LIBRARY_PATH", //$NON-NLS-1$ + "${libdir} ${base_libdir}", null); //$NON-NLS-1$ + + InputStream toolchainCMakeFileContent = new ByteArrayInputStream(toolchainCMakeFileContentAsString.getBytes()); + + IFile toolchainCMakeFile = project.getFile(TOOLCHAINCMAKE_FILE_NAME); + try { + if (toolchainCMakeFile.exists()) { + toolchainCMakeFile.delete(true, monitor); + } + toolchainCMakeFile.create(toolchainCMakeFileContent, true, monitor); + } catch (CoreException e) { + e.printStackTrace(); + } + } }
Signature · 1 line
1.7.9.5
PATCH 8/13 plugins/cmake: Defined the building toolchain
In reply to Atanas GegovFrom: Atanas Gegov <[email protected]>
The CMake build toolchain uses the previously defined builder and the cmake configure tool. The rest of the tools are the standard gnu compiler/ linker for C and C++.
--- .../OSGI-INF/l10n/bundle.properties | 3 ++ plugins/org.yocto.cmake.managedbuilder/plugin.xml | 45 ++++++++++++++++++++ 2 files changed, 48 insertions(+)
plugins/org.yocto.cmake.managedbuilder/OSGI-INF/l10n/bundle.properties +3 -0
@@ -18,6 +18,9 @@ extension.name=Yocto CMake Managed Builder # Builder builder.name=Yocto CMake Environment Builder +# Toolchain +toolchain=Yocto CMake Build (Toolchain) + # CMake configure cmakeconfigure.name=CMake configure cmakeconfigure.options=CMake Options
plugins/org.yocto.cmake.managedbuilder/plugin.xml +45 -0
50 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH 9/13 plugins/cmake: Added a new category for CMake projects
In reply to Atanas GegovFrom: Atanas Gegov <[email protected]>
Yocto CMake template projects should use this category. It appears in the new project wizard additionally to the existing category "Yocto Project ADT CMake Project".
--- .../OSGI-INF/l10n/bundle.properties | 3 +++ plugins/org.yocto.cmake.managedbuilder/plugin.xml | 8 ++++++++ 2 files changed, 11 insertions(+)
plugins/org.yocto.cmake.managedbuilder/OSGI-INF/l10n/bundle.properties +3 -0
@@ -12,6 +12,9 @@ Bundle-Vendor = yoctoproject.org Bundle-Name = Yocto CMake Plugin +# Artefact type +yocto.cmake.artefactType=Yocto Project ADT CMake Project + # Extension name extension.name=Yocto CMake Managed Builder
plugins/org.yocto.cmake.managedbuilder/plugin.xml +8 -0
@@ -2,6 +2,14 @@ <?eclipse version="3.4"?> <plugin> <extension + point="org.eclipse.cdt.managedbuilder.core.buildProperties"> + <propertyValue + id="org.yocto.sdk.ide.buildArtefact.cmake.exe" + name="%yocto.cmake.artefactType" + property="org.eclipse.cdt.build.core.buildArtefactType"> + </propertyValue> + </extension> + <extension id="org.yocto.cmake.managedbuilder" name="%extension.name" point="org.eclipse.cdt.managedbuilder.core.buildDefinitions">
Signature · 1 line
1.7.9.5
PATCH 10/13 plugins/cmake: Connect toolchain and new project category
In reply to Atanas GegovFrom: Atanas Gegov <[email protected]>
Defined a projectType that uses the new project category. It takes the CMake toolchain to build the project in a debug configuration. It is possible to add further configurations (e.g. "Release" with other option settings for the configure tool).
--- .../OSGI-INF/l10n/bundle.properties | 4 + plugins/org.yocto.cmake.managedbuilder/plugin.xml | 98 ++++++++++++++++++++ 2 files changed, 102 insertions(+)
plugins/org.yocto.cmake.managedbuilder/OSGI-INF/l10n/bundle.properties +4 -0
@@ -24,6 +24,10 @@ builder.name=Yocto CMake Environment Builder # Toolchain toolchain=Yocto CMake Build (Toolchain) +# Configuration names +config.debug.name=Debug +config.debug.description=Builds a version of the project which is ready for debugging + # CMake configure cmakeconfigure.name=CMake configure cmakeconfigure.options=CMake Options
plugins/org.yocto.cmake.managedbuilder/plugin.xml +98 -0
103 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH 11/13 plugins/cmake: Added CMake template projects
In reply to Atanas GegovFrom: Atanas Gegov <[email protected]>
Added a C and C++ HelloWorld template projects for CMake. The both have the new CMake project type and are therefore built with the CMake toolchain.
--- .../build.properties | 1 + plugins/org.yocto.cmake.managedbuilder/plugin.xml | 17 ++++++ .../HelloWorldCCMakeProject/src/CMakeLists.txt | 34 +++++++++++ .../HelloWorldCCMakeProject/src/main.c | 21 +++++++ .../HelloWorldCCMakeProject/template.properties | 31 ++++++++++ .../HelloWorldCCMakeProject/template.xml | 61 ++++++++++++++++++++ .../HelloWorldCPPCMakeProject/src/CMakeLists.txt | 34 +++++++++++ .../HelloWorldCPPCMakeProject/src/main.cpp | 21 +++++++ .../HelloWorldCPPCMakeProject/template.properties | 31 ++++++++++ .../HelloWorldCPPCMakeProject/template.xml | 61 ++++++++++++++++++++ 10 files changed, 312 insertions(+) create mode 100644 plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCCMakeProject/src/CMakeLists.txt create mode 100644 plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCCMakeProject/src/main.c create mode 100644 plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCCMakeProject/template.properties create mode 100644 plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCCMakeProject/template.xml create mode 100644 plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCPPCMakeProject/src/CMakeLists.txt create mode 100644 plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCPPCMakeProject/src/main.cpp create mode 100644 plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCPPCMakeProject/template.properties create mode 100644 plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCPPCMakeProject/template.xml
plugins/org.yocto.cmake.managedbuilder/build.properties +1 -0
@@ -3,4 +3,5 @@ output.. = bin/ bin.includes = META-INF/,\ .,\ plugin.xml,\ + templates/,\ OSGI-INF/
plugins/org.yocto.cmake.managedbuilder/plugin.xml +17 -0
@@ -263,4 +263,21 @@ </configuration> </projectType> </extension> + <extension + point="org.eclipse.cdt.core.templates"> + <template + filterPattern=".*gcc" + id="org.yocto.cmake.managedbuilder.template.helloWorldCCMakeProject" + isCategory="false" + location="templates/projecttemplates/HelloWorldCCMakeProject/template.xml" + projectType="org.yocto.sdk.ide.buildArtefact.cmake.exe"> + </template> + <template + filterPattern=".*g\+\+" + id="org.yocto.cmake.managedbuilder.template.helloWorldCPPCMakeProject" + isCategory="false" + location="templates/projecttemplates/HelloWorldCPPCMakeProject/template.xml" + projectType="org.yocto.sdk.ide.buildArtefact.cmake.exe"> + </template> + </extension> </plugin>
plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCCMakeProject/src/CMakeLists.txt new file +34 -0
@@ -0,0 +1,34 @@ +cmake_minimum_required (VERSION 2.8.1) + +######## Project settings ######## +PROJECT($(projectName)) +SET(LICENSE "TBD") + +######## Build and include settings ######## +include_directories( + inc +) + +link_directories( + ${LINK_DIRECTORIES} +) + + +file(GLOB SOURCES + "src/*.c" +) + +add_executable( + $(projectName) + + ${SOURCES} +) + +TARGET_LINK_LIBRARIES( + $(projectName) +) + +######## Install targets ######## +INSTALL(TARGETS $(projectName) + RUNTIME DESTINATION usr/bin +)
plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCCMakeProject/src/main.c new file +21 -0
@@ -0,0 +1,21 @@ +/** @mainpage $(projectName) - $(vendor) +* +* @author $(author) <$(email)> +* @version $(projectVersion) +**/ + + +#include <stdio.h> +/** +* Main class of project $(projectName) +* +* @param argc the number of arguments +* @param argv the arguments from the commandline +* @returns exit code of the application +*/ +int main (int argc,char **argv) { +// print a greeting to the console +printf ("Hello World!\n" ); + +return 0 ; +}
plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCCMakeProject/template.properties new file +31 -0
@@ -0,0 +1,31 @@ +#/******************************************************************************* +# * Copyright (c) 2013 BMW Car IT GmbH. +# * All rights reserved. This program and the accompanying materials +# * are made available under the terms of the Eclipse Public License v1.0 +# * which accompanies this distribution, and is available at +# * http://www.eclipse.org/legal/epl-v10.html +# * +# * Contributors: +# * BMW Car IT - initial implementation +# *******************************************************************************/ + +# Template +template.vendor=Yocto Project +template.name=Hello World C CMake Project +template.description=A simple C hello world project based on CMake + +# General Settings +general.name=General settings +general.description=Author properties of the project +general.author.name=Author +general.author.description=The author of the project +general.author.default=anonymous +general.email.name=Email address +general.email.description=The email address of the project's author [email protected] +general.vendor.name=Vendor +general.vendor.description=The vendor of the project +general.vendor.default=None +general.projectVersion.name=Version +general.projectVersion.description=The version of the project +general.projectVersion.default=1.0.0
plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCCMakeProject/template.xml new file +61 -0
61 lines not on this page · raw message
plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCPPCMakeProject/src/CMakeLists.txt new file +34 -0
@@ -0,0 +1,34 @@ +cmake_minimum_required (VERSION 2.8.1) + +######## Project settings ######## +PROJECT($(projectName)) +SET(LICENSE "TBD") + +######## Build and include settings ######## +include_directories( + inc +) + +link_directories( + ${LINK_DIRECTORIES} +) + + +file(GLOB SOURCES + "src/*.cpp" +) + +add_executable( + $(projectName) + + ${SOURCES} +) + +TARGET_LINK_LIBRARIES( + $(projectName) +) + +######## Install targets ######## +INSTALL(TARGETS $(projectName) + RUNTIME DESTINATION usr/bin +)
plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCPPCMakeProject/src/main.cpp new file +21 -0
@@ -0,0 +1,21 @@ +/** @mainpage $(projectName) - $(vendor) + * + * @author $(author) <$(email)> + * @version $(projectVersion) +**/ + + +#include <stdio.h> +/** + * Main class of project $(projectName) + * + * @param argc the number of arguments + * @param argv the arguments from the commandline + * @returns exit code of the application + */ +int main(int argc, char **argv) { + // print a greeting to the console + printf("Hello World!\n"); + + return 0; +}
plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCPPCMakeProject/template.properties new file +31 -0
@@ -0,0 +1,31 @@ +#/******************************************************************************* +# * Copyright (c) 2013 BMW Car IT GmbH. +# * All rights reserved. This program and the accompanying materials +# * are made available under the terms of the Eclipse Public License v1.0 +# * which accompanies this distribution, and is available at +# * http://www.eclipse.org/legal/epl-v10.html +# * +# * Contributors: +# * BMW Car IT - initial implementation +# *******************************************************************************/ + +# Template +template.vendor=Yocto Project +template.name=Hello World C++ CMake Project +template.description=A simple C++ hello world project based on CMake + +# General Settings +general.name=General settings +general.description=Author properties of the project +general.author.name=Author +general.author.description=The author of the project +general.author.default=anonymous +general.email.name=Email address +general.email.description=The email address of the project's author [email protected] +general.vendor.name=Vendor +general.vendor.description=The vendor of the project +general.vendor.default=None +general.projectVersion.name=Version +general.projectVersion.description=The version of the project +general.projectVersion.default=1.0.0
plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCPPCMakeProject/template.xml new file +61 -0
61 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH 12/13 plugins/sdk.ide: Adapted RemoteDebugLauncher for CMake projects
In reply to Atanas GegovFrom: Atanas Gegov <[email protected]>
The Yocto CMake projects are built for more clarity in a Debug folder and not in the source tree. The binary is therefore not inside the src folder but in the Debug folder.
--- .../src/org/yocto/sdk/ide/utils/YoctoSDKUtils.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/utils/YoctoSDKUtils.java +9 -4
@@ -303,10 +303,15 @@ public class YoctoSDKUtils { //TWEAK avoid loading default values in org.eclipse.cdt.launch.remote.tabs.RemoteCDebuggerTab w_copy.setAttribute("org.eclipse.cdt.launch.remote.RemoteCDSFDebuggerTab.DEFAULTS_SET",true); w_copy.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, projectName); - if(!project.hasNature(YoctoSDKEmptyProjectNature.YoctoSDK_EMPTY_NATURE_ID)) - { - String project_src = "src/"+projectName; - w_copy.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, project_src); + if (!project.hasNature(YoctoSDKEmptyProjectNature.YoctoSDK_EMPTY_NATURE_ID)) { + String pathToCompiledBinary = ""; + if (project.hasNature(YoctoSDKCMakeProjectNature.YoctoSDK_CMAKE_NATURE_ID)) { + pathToCompiledBinary = "Debug/"; + } else { + pathToCompiledBinary = "src/"; + } + pathToCompiledBinary += projectName; + w_copy.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, pathToCompiledBinary); } w_copy.doSave();
Signature · 1 line
1.7.9.5
PATCH 13/13 features/sdk: Added CMake plugin to sdk feature
In reply to Atanas GegovFrom: Atanas Gegov <[email protected]>
Made the CMake extension plugin a part of the
Yocto sdk feature.
--- features/org.yocto.sdk/feature.xml | 6 ++++++ 1 file changed, 6 insertions(+)
features/org.yocto.sdk/feature.xml +6 -0
@@ -93,4 +93,10 @@ version="0.0.0" unpack="false"/> + <plugin + id="org.yocto.cmake.managedbuilder" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> </feature>
Signature · 1 line
1.7.9.5
Hi Atanas,
Seems this patch series relies on the previous RFC patches: [yocto] [eclipse-poky][RFCv2 0/7] Introducing a YoctoSDKCMakeProjectNature. Since they were RFC, I didn't apply them and this patch series will report YoctoSDKCMakeProjectNature can't be resolved. Can you send the YoctoSDKCMakeNature as patches not RFC?
Thanks,
Jessica
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Atanas Gegov
Sent: Thursday, May 23, 2013 1:40 AM
To: [email protected]
Subject: [yocto] [eclipse-poky][PATCH 00/13] Completed CMake integration in the Yocto IDE
From: Atanas Gegov <[email protected]>
Hi,
this patch series adds a new plugin containing a CMake configure tool, a toolchain and a project type for building CMake projects in the Yocto IDE. The plugin also introduces Hello World templates for C and C++. With this patch series the CMake integration is completed and the CMake projects can be built, debugged etc. as already known from the Autotools-based projects.
Cheers,
Atanas
P.S: This patch series requires the already discussed patch series "[eclipse-poky][RFCv2 0/7] Introducing a YoctoSDKCMakeProjectNature".
Atanas Gegov (13):
plugins/cmake: Added an empty CMake integration plugin plugins/cmake: Defined CMake tool with options plugins/sdk.ide: Added a method to get project environment plugins/cmake: Preparing a configure Job plugins/cmake: Added run method to configure Job plugins/cmake: Added a Makefile generator plugins/cmake: Added the generation of toolchain.cmake plugins/cmake: Defined the building toolchain plugins/cmake: Added a new category for CMake projects plugins/cmake: Connect toolchain and new project category plugins/cmake: Added CMake template projects plugins/sdk.ide: Adapted RemoteDebugLauncher for CMake projects features/sdk: Added CMake plugin to sdk feature
features/org.yocto.sdk/feature.xml | 6 + plugins/org.yocto.cmake.managedbuilder/.classpath | 7 + plugins/org.yocto.cmake.managedbuilder/.project | 28 ++ .../.settings/org.eclipse.jdt.core.prefs | 8 + .../META-INF/MANIFEST.MF | 16 ++ .../OSGI-INF/l10n/bundle.properties | 40 +++ .../build.properties | 7 + plugins/org.yocto.cmake.managedbuilder/plugin.xml | 283 ++++++++++++++++++++ .../org/yocto/cmake/managedbuilder/Activator.java | 50 ++++ .../YoctoCMakeMakefileGenerator.java | 281 +++++++++++++++++++ .../cmake/managedbuilder/YoctoCMakeMessages.java | 57 ++++ .../managedbuilder/YoctoCMakeMessages.properties | 27 ++ .../managedbuilder/job/ExecuteConfigureJob.java | 149 +++++++++++ .../cmake/managedbuilder/util/ConsoleUtility.java | 49 ++++ .../cmake/managedbuilder/util/SystemProcess.java | 118 ++++++++ .../HelloWorldCCMakeProject/src/CMakeLists.txt | 34 +++ .../HelloWorldCCMakeProject/src/main.c | 21 ++ .../HelloWorldCCMakeProject/template.properties | 31 +++ .../HelloWorldCCMakeProject/template.xml | 61 +++++ .../HelloWorldCPPCMakeProject/src/CMakeLists.txt | 34 +++ .../HelloWorldCPPCMakeProject/src/main.cpp | 21 ++ .../HelloWorldCPPCMakeProject/template.properties | 31 +++ .../HelloWorldCPPCMakeProject/template.xml | 61 +++++ .../src/org/yocto/sdk/ide/utils/YoctoSDKUtils.java | 29 +- 24 files changed, 1445 insertions(+), 4 deletions(-) create mode 100644 plugins/org.yocto.cmake.managedbuilder/.classpath create mode 100644 plugins/org.yocto.cmake.managedbuilder/.project create mode 100644 plugins/org.yocto.cmake.managedbuilder/.settings/org.eclipse.jdt.core.prefs create mode 100644 plugins/org.yocto.cmake.managedbuilder/META-INF/MANIFEST.MF create mode 100644 plugins/org.yocto.cmake.managedbuilder/OSGI-INF/l10n/bundle.properties create mode 100644 plugins/org.yocto.cmake.managedbuilder/build.properties create mode 100644 plugins/org.yocto.cmake.managedbuilder/plugin.xml create mode 100644 plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/Activator.java create mode 100644 plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/YoctoCMakeMakefileGenerator.java create mode 100644 plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/YoctoCMakeMessages.java create mode 100644 plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/YoctoCMakeMessages.properties create mode 100644 plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/job/ExecuteConfigureJob.java create mode 100644 plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/util/ConsoleUtility.java create mode 100644 plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/util/SystemProcess.java create mode 100644 plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCCMakeProject/src/CMakeLists.txt create mode 100644 plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCCMakeProject/src/main.c create mode 100644 plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCCMakeProject/template.properties create mode 100644 plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCCMakeProject/template.xml create mode 100644 plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCPPCMakeProject/src/CMakeLists.txt create mode 100644 plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCPPCMakeProject/src/main.cpp create mode 100644 plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCPPCMakeProject/template.properties create mode 100644 plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCPPCMakeProject/template.xml
--
1.7.9.5
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto
Hi Jessica,
Yes, this patch series indeed relies on the previous RFC patches: [yocto] [eclipse-poky][RFCv2 0/7] Introducing a YoctoSDKCMakeProjectNature. I will resend the series as PATCH.
Best regards,
Atanas
Quoted 128 lines · Jessica
Hi Atanas,
Seems this patch series relies on the previous RFC patches: [yocto] [eclipse-poky][RFCv2 0/7] Introducing a YoctoSDKCMakeProjectNature. Since they were RFC, I didn't apply them and this patch series will report YoctoSDKCMakeProjectNature can't be resolved. Can you send the YoctoSDKCMakeNature as patches not RFC?
Thanks,
Jessica-----Original Message-----
From: [email protected] [mailto:
[email protected]] On Behalf Of Atanas Gegov
Sent: Thursday, May 23, 2013 1:40 AM
To: [email protected]
Subject: [yocto] [eclipse-poky][PATCH 00/13] Completed CMake integration in the Yocto IDEFrom: Atanas Gegov <[email protected]>
Hi,
this patch series adds a new plugin containing a CMake configure tool, a toolchain and a project type for building CMake projects in the Yocto IDE. The plugin also introduces Hello World templates for C and C++. With this patch series the CMake integration is completed and the CMake projects can be built, debugged etc. as already known from the Autotools-based projects.
Cheers,
Atanas
P.S: This patch series requires the already discussed patch series "[eclipse-poky][RFCv2 0/7] Introducing a YoctoSDKCMakeProjectNature".Atanas Gegov (13):
plugins/cmake: Added an empty CMake integration plugin plugins/cmake: Defined CMake tool with options plugins/sdk.ide: Added a method to get project environment plugins/cmake: Preparing a configure Job plugins/cmake: Added run method to configure Job plugins/cmake: Added aMakefilegenerator plugins/cmake: Added the generation of toolchain.cmake plugins/cmake: Defined the building toolchain plugins/cmake: Added a new category for CMake projects plugins/cmake: Connect toolchain and new project category plugins/cmake: Added CMake template projects plugins/sdk.ide: Adapted RemoteDebugLauncher for CMake projects features/sdk: Added CMake plugin to sdk featurefeatures/org.yocto.sdk/feature.xml | 6 + plugins/org.yocto.cmake.managedbuilder/.classpath | 7 + plugins/org.yocto.cmake.managedbuilder/.project | 28 ++ .../.settings/org.eclipse.jdt.core.prefs | 8 + .../META-INF/MANIFEST.MF | 16 ++ .../OSGI-INF/l10n/bundle.properties | 40 +++ .../build.properties | 7 + plugins/org.yocto.cmake.managedbuilder/plugin.xml | 283 ++++++++++++++++++++ .../org/yocto/cmake/managedbuilder/Activator.java | 50 ++++ .../YoctoCMakeMakefileGenerator.java | 281 +++++++++++++++++++ .../cmake/managedbuilder/YoctoCMakeMessages.java | 57 ++++ .../managedbuilder/YoctoCMakeMessages.properties | 27 ++ .../managedbuilder/job/ExecuteConfigureJob.java | 149 +++++++++++ .../cmake/managedbuilder/util/ConsoleUtility.java | 49 ++++ .../cmake/managedbuilder/util/SystemProcess.java | 118 ++++++++ .../HelloWorldCCMakeProject/src/CMakeLists.txt | 34 +++ .../HelloWorldCCMakeProject/src/main.c | 21 ++ .../HelloWorldCCMakeProject/template.properties | 31 +++ .../HelloWorldCCMakeProject/template.xml | 61 +++++ .../HelloWorldCPPCMakeProject/src/CMakeLists.txt | 34 +++ .../HelloWorldCPPCMakeProject/src/main.cpp | 21 ++ .../HelloWorldCPPCMakeProject/template.properties | 31 +++ .../HelloWorldCPPCMakeProject/template.xml | 61 +++++ .../src/org/yocto/sdk/ide/utils/YoctoSDKUtils.java | 29 +- 24 files changed, 1445 insertions(+), 4 deletions(-) create mode 100644 plugins/org.yocto.cmake.managedbuilder/.classpath create mode 100644 plugins/org.yocto.cmake.managedbuilder/.project create mode 100644 plugins/org.yocto.cmake.managedbuilder/.settings/org.eclipse.jdt.core.prefs create mode 100644 plugins/org.yocto.cmake.managedbuilder/META-INF/MANIFEST.MF create mode 100644 plugins/org.yocto.cmake.managedbuilder/OSGI-INF/l10n/bundle.properties create mode 100644 plugins/org.yocto.cmake.managedbuilder/build.properties create mode 100644 plugins/org.yocto.cmake.managedbuilder/plugin.xml create mode 100644 plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/Activator.java create mode 100644 plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/YoctoCMakeMakefileGenerator.java create mode 100644 plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/YoctoCMakeMessages.java create mode 100644 plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/YoctoCMakeMessages.properties create mode 100644 plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/job/ExecuteConfigureJob.java create mode 100644 plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/util/ConsoleUtility.java create mode 100644 plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/util/SystemProcess.java create mode 100644 plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCCMakeProject/src/CMakeLists.txt create mode 100644 plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCCMakeProject/src/main.c create mode 100644 plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCCMakeProject/template.properties create mode 100644 plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCCMakeProject/template.xml create mode 100644 plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCPPCMakeProject/src/CMakeLists.txt create mode 100644 plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCPPCMakeProject/src/main.cpp create mode 100644 plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCPPCMakeProject/template.properties create mode 100644
plugins/org.yocto.cmake.managedbuilder/templates/projecttemplates/HelloWorldCPPCMakeProject/template.xml--
1.7.9.5_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto