[cmake-commits] king committed cmMakefileTargetGenerator.cxx 1.68
1.69 cmSourceFile.cxx 1.36 1.37
cmake-commits at cmake.org
cmake-commits at cmake.org
Thu Sep 13 13:37:47 EDT 2007
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv28955/Source
Modified Files:
cmMakefileTargetGenerator.cxx cmSourceFile.cxx
Log Message:
ENH: Added OBJECT_OUTPUTS source file property. Updated PrecompiledHeader test to use it (making the test simpler).
Index: cmSourceFile.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSourceFile.cxx,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- cmSourceFile.cxx 18 Jun 2007 15:59:23 -0000 1.36
+++ cmSourceFile.cxx 13 Sep 2007 17:37:45 -0000 1.37
@@ -402,6 +402,14 @@
"building this source file.");
cm->DefineProperty
+ ("OBJECT_OUTPUTS", cmProperty::SOURCE_FILE,
+ "Additional outputs for a Makefile rule.",
+ "Additional outputs created by compilation of this source file. "
+ "If any of these outputs is missing the object will be recompiled. "
+ "This is supported only on Makefile generators and will be ignored "
+ "on other generators.");
+
+ cm->DefineProperty
("SYMBOLIC", cmProperty::SOURCE_FILE,
"Is this just a name for a rule.",
"If SYMBOLIC (boolean) is set to true the build system will be "
Index: cmMakefileTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileTargetGenerator.cxx,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -d -r1.68 -r1.69
--- cmMakefileTargetGenerator.cxx 7 Aug 2007 17:57:13 -0000 1.68
+++ cmMakefileTargetGenerator.cxx 13 Sep 2007 17:37:45 -0000 1.69
@@ -517,6 +517,25 @@
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 &&
More information about the Cmake-commits
mailing list