diff options
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator.cxx b/Source/cmLocalUnixMakefileGenerator.cxx index 5c9d260..7ab9b2a 100644 --- a/Source/cmLocalUnixMakefileGenerator.cxx +++ b/Source/cmLocalUnixMakefileGenerator.cxx @@ -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); } |