BUG: fix compile flags for a single file

This commit is contained in:
Bill Hoffman 2002-12-02 10:33:35 -05:00
parent 43a4436551
commit 3851ac2416
1 changed files with 5 additions and 3 deletions

View File

@ -2371,17 +2371,19 @@ void cmLocalUnixMakefileGenerator::OutputSourceObjectBuildRules(std::ostream& fo
std::string shortNameWithExt = shortName +
(*source)->GetSourceExtension();
// Only output a rule for each .o once.
std::string compileFlags = exportsDef;
compileFlags += " ";
if(rules.find(shortNameWithExt) == rules.end())
{
if((*source)->GetProperty("COMPILE_FLAGS"))
{
exportsDef += (*source)->GetProperty("COMPILE_FLAGS");
exportsDef += " ";
compileFlags += (*source)->GetProperty("COMPILE_FLAGS");
}
this->OutputBuildObjectFromSource(fout,
shortName.c_str(),
*(*source),
exportsDef.c_str(),
compileFlags.c_str(),
shared);
rules.insert(shortNameWithExt);
}