[yocto] [eclipse][PATCH] plugins/cmake: Add sysroot specific include paths

Zhang, Jessica jessica.zhang at intel.com
Thu May 22 11:04:52 PDT 2014


Pulled into eclipse-poky-kepler master.  Thanks for the contribution!  - Jessica

-----Original Message-----
From: yocto-bounces at yoctoproject.org [mailto:yocto-bounces at yoctoproject.org] On Behalf Of Timo Mueller
Sent: Thursday, May 22, 2014 1:57 AM
To: yocto at yoctoproject.org
Cc: Timo Mueller
Subject: [yocto] [eclipse][PATCH] plugins/cmake: Add sysroot specific include paths

From: Timo Mueller <timo.mueller at bmw-carit.de>

CDT sets default include paths when a defined toolchain does not provide include paths of its own. The default include paths point to the host system which does not make sense for cross compiled projects.

Instead of using the default include paths we provide our own path that points to the usr/include folder in the defined sysroot. Once this custom include path is defined CDT does not add any additional include paths.

[BUGFIX #5544]

Signed-off-by: Timo Mueller <timo.mueller at bmw-carit.de>
---
 plugins/org.yocto.cmake.managedbuilder/plugin.xml | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/plugins/org.yocto.cmake.managedbuilder/plugin.xml b/plugins/org.yocto.cmake.managedbuilder/plugin.xml
index 7aa6671..431de6e 100644
--- a/plugins/org.yocto.cmake.managedbuilder/plugin.xml
+++ b/plugins/org.yocto.cmake.managedbuilder/plugin.xml
@@ -178,9 +178,10 @@
                 name="%config.debug.name"
                 parent="cdt.managedbuild.config.gnu.base">
                 <toolChain
-                    id="org.yocto.cmake.managedbuilder.toolchain.gnu.exe.debug"
-                    superClass="org.yocto.cmake.managedbuilder.toolchain.gnu.exe"
-                    supportsManagedBuild="true">
+                      id="org.yocto.cmake.managedbuilder.toolchain.gnu.exe.debug"
+                      languageSettingsProviders="org.yocto.cmake.managedbuilder.includeProvider"
+                      superClass="org.yocto.cmake.managedbuilder.toolchain.gnu.exe"
+                      supportsManagedBuild="true">
                     <targetPlatform
                         id="org.yocto.cmake.managedbuilder.target.gnu.exe.debug"
                         isAbstract="false"
@@ -280,4 +281,16 @@
             projectType="org.yocto.sdk.ide.buildArtefact.cmake.exe">
         </template>
     </extension>
+    <extension
+          point="org.eclipse.cdt.core.LanguageSettingsProvider">
+       <provider
+             id="org.yocto.cmake.managedbuilder.includeProvider"
+             name="IncludeProvider"
+             prefer-non-shared="false">
+          <entry
+                kind="includePath"
+                name="${Sysroot}/usr/include">
+          </entry>
+       </provider>
+    </extension>
 </plugin>
--
1.9.0

--
_______________________________________________
yocto mailing list
yocto at yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto



More information about the yocto mailing list