builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildConfiguration.java
branchRCL_2_4
changeset 855 3f37e327885c
parent 140 697b7727d088
child 1147 c2836b036bd5
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildConfiguration.java	Thu Jan 28 13:51:00 2010 -0600
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildConfiguration.java	Mon Feb 01 12:38:42 2010 -0600
@@ -28,12 +28,14 @@
 import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.Status;
 
 import com.nokia.carbide.cdt.builder.BuildArgumentsInfo;
 import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
+import com.nokia.carbide.cdt.builder.EpocEngineHelper;
 import com.nokia.carbide.cdt.builder.builder.CarbideCPPBuilder;
 import com.nokia.carbide.cdt.builder.project.IBuildArgumentsInfo;
 import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
@@ -318,6 +320,10 @@
 			macros.add("NDEBUG"); //$NON-NLS-1$
 		}
 		
+		if (hasSTDCPPSupport()){ 
+			macros.add("__SYMBIAN_STDCPP_SUPPORT__"); 
+		}
+		
 		return macros;
 	}
 
@@ -374,4 +380,24 @@
 	public IROMBuilderInfo getROMBuildInfo() {
 		return romBuilderInfo;
 	}
+	
+	private boolean hasSTDCPPSupport() {
+
+		ICarbideProjectInfo cpi = getCarbideProject();
+		List<ISymbianBuildContext> buildConfig = new ArrayList<ISymbianBuildContext>();
+		List<IPath> normalMakMakePaths = new ArrayList<IPath>();
+		List<IPath> testMakMakePaths = new ArrayList<IPath>();
+		buildConfig.add(this);
+		EpocEngineHelper.getMakMakeFiles(cpi.getAbsoluteBldInfPath(),
+				buildConfig, normalMakMakePaths, testMakMakePaths,
+				new NullProgressMonitor());
+
+		for (IPath mmpPath : normalMakMakePaths) {
+			if (EpocEngineHelper.hasSTDCPPSupport(cpi, mmpPath)) {
+				return true;
+			}
+		}
+
+		return false;
+	} 
 }