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 + std::string shortNameWithExt = shortName +
(*source)->GetSourceExtension(); (*source)->GetSourceExtension();
// Only output a rule for each .o once. // Only output a rule for each .o once.
std::string compileFlags = exportsDef;
compileFlags += " ";
if(rules.find(shortNameWithExt) == rules.end()) if(rules.find(shortNameWithExt) == rules.end())
{ {
if((*source)->GetProperty("COMPILE_FLAGS")) if((*source)->GetProperty("COMPILE_FLAGS"))
{ {
exportsDef += (*source)->GetProperty("COMPILE_FLAGS"); compileFlags += (*source)->GetProperty("COMPILE_FLAGS");
exportsDef += " ";
} }
this->OutputBuildObjectFromSource(fout, this->OutputBuildObjectFromSource(fout,
shortName.c_str(), shortName.c_str(),
*(*source), *(*source),
exportsDef.c_str(), compileFlags.c_str(),
shared); shared);
rules.insert(shortNameWithExt); rules.insert(shortNameWithExt);
} }