|  | @@ -1182,7 +1182,10 @@ const char* cmLocalGenerator::GetIncludeFlags(const char* lang)
 | 
	
		
			
				|  |  |      {
 | 
	
		
			
				|  |  |      flags[flags.size()-1] = ' ';
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  | -  flags += this->Makefile->GetDefineFlags();
 | 
	
		
			
				|  |  | +  std::string defineFlags = this->Makefile->GetDefineFlags();
 | 
	
		
			
				|  |  | +  std::cout << defineFlags << "\n";
 | 
	
		
			
				|  |  | +  this->FixDefineFlags(defineFlags, lang);
 | 
	
		
			
				|  |  | +  flags += defineFlags;
 | 
	
		
			
				|  |  |    this->LanguageToIncludeFlags[lang] = flags;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |    // Use this temorary variable for the return value to work-around a
 | 
	
	
		
			
				|  | @@ -1191,6 +1194,41 @@ const char* cmLocalGenerator::GetIncludeFlags(const char* lang)
 | 
	
		
			
				|  |  |    return ret;
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +//----------------------------------------------------------------------------
 | 
	
		
			
				|  |  | +void cmLocalGenerator::FixDefineFlags(std::string& flags, 
 | 
	
		
			
				|  |  | +                                      const char* lang)
 | 
	
		
			
				|  |  | +{
 | 
	
		
			
				|  |  | +  std::string defineFlagVar = "CMAKE_DEFINE_FLAG_";
 | 
	
		
			
				|  |  | +  defineFlagVar += lang;
 | 
	
		
			
				|  |  | +  std::string defineFlag = 
 | 
	
		
			
				|  |  | +    this->Makefile->GetSafeDefinition(defineFlagVar.c_str());
 | 
	
		
			
				|  |  | +  if(defineFlag.size() == 0)
 | 
	
		
			
				|  |  | +    {
 | 
	
		
			
				|  |  | +    return;
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +  std::vector<std::string> args;
 | 
	
		
			
				|  |  | +  cmSystemTools::ParseWindowsCommandLine(flags.c_str(), args);
 | 
	
		
			
				|  |  | +  std::string fixedFlags;
 | 
	
		
			
				|  |  | +  const char* sep = 0;
 | 
	
		
			
				|  |  | +  for(std::vector<std::string>::iterator i = args.begin();
 | 
	
		
			
				|  |  | +      i != args.end(); ++i)
 | 
	
		
			
				|  |  | +    {
 | 
	
		
			
				|  |  | +    if(sep)
 | 
	
		
			
				|  |  | +      {
 | 
	
		
			
				|  |  | +      fixedFlags += sep;
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +    else
 | 
	
		
			
				|  |  | +      {
 | 
	
		
			
				|  |  | +      sep = " ";
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +    cmSystemTools::ReplaceString(*i, "-D", defineFlag.c_str());
 | 
	
		
			
				|  |  | +    fixedFlags += *i;
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +  flags = fixedFlags;
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                                             
 | 
	
		
			
				|  |  | +                                             
 | 
	
		
			
				|  |  |  //----------------------------------------------------------------------------
 | 
	
		
			
				|  |  |  void cmLocalGenerator::GetIncludeDirectories(std::vector<std::string>& dirs,
 | 
	
		
			
				|  |  |                                               bool filter_system_dirs)
 |