summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-09-13 17:37:45 (GMT)
committerBrad King <brad.king@kitware.com>2007-09-13 17:37:45 (GMT)
commit9f542f4ef78693092652d41ff4de1970e6af6c1d (patch)
treed0020f7e14d876fa612e72398bc10ef243c07c34 /Source/cmMakefileTargetGenerator.cxx
parent782c5c270f4aee955c0868d23e677ba2015d3efd (diff)
downloadCMake-9f542f4ef78693092652d41ff4de1970e6af6c1d.zip
CMake-9f542f4ef78693092652d41ff4de1970e6af6c1d.tar.gz
CMake-9f542f4ef78693092652d41ff4de1970e6af6c1d.tar.bz2
ENH: Added OBJECT_OUTPUTS source file property. Updated PrecompiledHeader test to use it (making the test simpler).
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileTargetGenerator.cxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 2417b4a..b2b3fa1 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -517,6 +517,25 @@ cmMakefileTargetGenerator
relativeObj.c_str(),
depends, commands, false);
+ // Check for extra outputs created by the compilation.
+ if(const char* extra_outputs_str =
+ source.GetProperty("OBJECT_OUTPUTS"))
+ {
+ std::vector<std::string> extra_outputs;
+ cmSystemTools::ExpandListArgument(extra_outputs_str, extra_outputs);
+ for(std::vector<std::string>::const_iterator eoi = extra_outputs.begin();
+ eoi != extra_outputs.end(); ++eoi)
+ {
+ // Register this as an extra output for the object file rule.
+ // This will cause the object file to be rebuilt if the extra
+ // output is missing.
+ this->GenerateExtraOutput(eoi->c_str(), relativeObj.c_str(), false);
+
+ // Register this as an extra file to clean.
+ this->CleanFiles.push_back(eoi->c_str());
+ }
+ }
+
bool lang_is_c_or_cxx = ((strcmp(lang, "C") == 0) ||
(strcmp(lang, "CXX") == 0));
bool do_preprocess_rules = lang_is_c_or_cxx &&