Don't make hasSTDCPPSupport API. Review fixes for bug 10460.
authortimkelly
Mon, 01 Feb 2010 11:12:20 -0600
changeset 854 a7d9320cd85e
parent 853 6c8527cdaa2e
child 856 74d8d653d11a
Don't make hasSTDCPPSupport API. Review fixes for bug 10460.
builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/project/ICarbideBuildConfiguration.java
builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildConfiguration.java
builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideLanguageData.java
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/project/ICarbideBuildConfiguration.java	Mon Feb 01 10:28:41 2010 -0600
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/project/ICarbideBuildConfiguration.java	Mon Feb 01 11:12:20 2010 -0600
@@ -131,12 +131,5 @@
 	 * Compares two configurations to see if their display names are equivalent.
 	 */
 	boolean equals(Object obj);
-
-	/**
-	 * Check whether or not the build configuration has an MMP that supports standard C++
-	 * @return true if the project has one MMP with standard C++ support
-	 * @see EpocEngineHelper#hasSTDCPPSupport(ICarbideProjectInfo, IPath)
-	 */
-	boolean hasSTDCPPSupport();
 	
 }
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildConfiguration.java	Mon Feb 01 10:28:41 2010 -0600
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildConfiguration.java	Mon Feb 01 11:12:20 2010 -0600
@@ -21,6 +21,7 @@
 
 import org.eclipse.cdt.core.CCorePlugin;
 import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.settings.model.CMacroEntry;
 import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
 import org.eclipse.cdt.core.settings.model.ICProjectDescription;
 import org.eclipse.cdt.core.settings.model.ICStorageElement;
@@ -320,6 +321,10 @@
 			macros.add("NDEBUG"); //$NON-NLS-1$
 		}
 		
+		if (hasSTDCPPSupport()){
+			macros.add("__SYMBIAN_STDCPP_SUPPORT__");
+		}
+		
 		return macros;
 	}
 
@@ -378,14 +383,14 @@
 	}
 
 
-	public boolean hasSTDCPPSupport() {
+	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(cpi.getDefaultConfiguration());
+		buildConfig.add(this);
 		EpocEngineHelper.getMakMakeFiles(cpi.getAbsoluteBldInfPath(), buildConfig, normalMakMakePaths, testMakMakePaths, new NullProgressMonitor());
 		
 		for (IPath mmpPath : normalMakMakePaths){
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideLanguageData.java	Mon Feb 01 10:28:41 2010 -0600
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideLanguageData.java	Mon Feb 01 11:12:20 2010 -0600
@@ -140,10 +140,6 @@
 				macros.add(new CMacroEntry(define.getNameAndArguments(), define.getExpansion(), 0));
 			}
 			
-			if (carbideBuildConfig.hasSTDCPPSupport()){
-				macros.add(new CMacroEntry("__SYMBIAN_STDCPP_SUPPORT__", "", 0));
-			}
-			
 			return macros.toArray(new ICLanguageSettingEntry[macros.size()]);
 		}