Make use of system include paths returned by Raptor config query.
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideLanguageData.java Fri Jul 23 11:15:18 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideLanguageData.java Fri Jul 23 14:21:59 2010 -0500
@@ -55,6 +55,7 @@
import com.nokia.carbide.cpp.internal.api.sdk.ISBSv2BuildInfo;
import com.nokia.carbide.cpp.sdk.core.IBSFPlatform;
import com.nokia.carbide.cpp.sdk.core.ISBSv1BuildContext;
+import com.nokia.carbide.cpp.sdk.core.ISBSv2BuildContext;
import com.nokia.carbide.cpp.sdk.core.ISBVPlatform;
import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
import com.nokia.carbide.cpp.sdk.core.ISymbianBuilderID;
@@ -243,6 +244,25 @@
includeEntries.add(new CIncludePathEntry(incPath, ICSettingEntry.LOCAL));
}
}
+
+ if (context instanceof ISBSv2BuildContext) {
+ // SBSv2 only system includes
+ for (IPath incPath : ((ISBSv2BuildContext)context).getSystemIncludes()) {
+ IPath projRelIncPath = FileUtils.removePrefixFromPath(projectPath, incPath);
+ if (projRelIncPath != null) {
+ includeEntries.add(new CIncludePathEntry(projectPath.append(projRelIncPath), 0));
+ } else {
+ includeEntries.add(new CIncludePathEntry(incPath, 0));
+ }
+
+ // remove duplicate system includes
+ File inc = incPath.toFile();
+ if (systemIncludes.contains(inc)) {
+ systemIncludes.remove(inc);
+ }
+ }
+ }
+
for (File inc : systemIncludes) {
// convert the absolute path to project relative if possible
IPath incPath = new Path(inc.toString());
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/BuildContextSBSv2.java Fri Jul 23 11:15:18 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/BuildContextSBSv2.java Fri Jul 23 14:21:59 2010 -0500
@@ -3,7 +3,7 @@
import java.io.File;
import java.text.MessageFormat;
import java.util.ArrayList;
-import java.util.Collections;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -336,4 +336,27 @@
}
return TOOLCHAIN_UNKNOWN;
}
+
+ @Override
+ public List<IPath> getSystemIncludes() {
+ if (configQueryData != null) {
+ List<String> includes = configQueryData.getMetaDataIncludes();
+ if (includes != null && !includes.isEmpty()) {
+ List<IPath> includePaths = new ArrayList<IPath>();
+ for (Iterator<String> itr = includes.iterator(); itr.hasNext();) {
+ String include = itr.next();
+ if (include.length() == 0 || include.equals(".")) {
+ continue;
+ }
+ Path includePath = new Path(include);
+ if (!includePaths.contains(includePath)) {
+ includePaths.add(includePath);
+ }
+ }
+ return includePaths;
+ }
+ }
+ return null;
+ }
+
}
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/sdk/core/ISBSv2BuildContext.java Fri Jul 23 11:15:18 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/sdk/core/ISBSv2BuildContext.java Fri Jul 23 14:21:59 2010 -0500
@@ -1,5 +1,9 @@
package com.nokia.carbide.cpp.sdk.core;
+import java.util.List;
+
+import org.eclipse.core.runtime.IPath;
+
public interface ISBSv2BuildContext extends ISymbianBuildContext {
@@ -44,5 +48,10 @@
* @return tool chain name (e.g. 'ARM', 'GCCE', 'WINSCW')
*/
public String getToolChain();
-
+
+ /**
+ * Get system include paths returned by Raptor config query.
+ * @return list of include paths
+ */
+ public List<IPath> getSystemIncludes();
}