|  | @@ -759,7 +759,8 @@ void cmGlobalGenerator::CheckCompilerIdCompatibility(cmMakefile* mf,
 | 
	
		
			
				|  |  |      switch(mf->GetPolicyStatus(cmPolicies::CMP0025))
 | 
	
		
			
				|  |  |        {
 | 
	
		
			
				|  |  |        case cmPolicies::WARN:
 | 
	
		
			
				|  |  | -        if(!this->CMakeInstance->GetIsInTryCompile())
 | 
	
		
			
				|  |  | +        if(!this->CMakeInstance->GetIsInTryCompile() &&
 | 
	
		
			
				|  |  | +           mf->PolicyOptionalWarningEnabled("CMAKE_POLICY_WARNING_CMP0025"))
 | 
	
		
			
				|  |  |            {
 | 
	
		
			
				|  |  |            cmOStringStream w;
 | 
	
		
			
				|  |  |            w << policies->GetPolicyWarning(cmPolicies::CMP0025) << "\n"
 | 
	
	
		
			
				|  | @@ -790,7 +791,8 @@ void cmGlobalGenerator::CheckCompilerIdCompatibility(cmMakefile* mf,
 | 
	
		
			
				|  |  |      switch(mf->GetPolicyStatus(cmPolicies::CMP0047))
 | 
	
		
			
				|  |  |        {
 | 
	
		
			
				|  |  |        case cmPolicies::WARN:
 | 
	
		
			
				|  |  | -        if(!this->CMakeInstance->GetIsInTryCompile())
 | 
	
		
			
				|  |  | +        if(!this->CMakeInstance->GetIsInTryCompile() &&
 | 
	
		
			
				|  |  | +           mf->PolicyOptionalWarningEnabled("CMAKE_POLICY_WARNING_CMP0047"))
 | 
	
		
			
				|  |  |            {
 | 
	
		
			
				|  |  |            cmOStringStream w;
 | 
	
		
			
				|  |  |            w << policies->GetPolicyWarning(cmPolicies::CMP0047) << "\n"
 |