exports: move the handling of missing targets into subclasses

Before, cmExportFileGenerator::ComplainAboutMissingTarget() was a virtual
function which had to be implemented in the subclasses. It is not
anymore. Instead, there is now a virtual function
HandleMissingTargets(), which is implemented in the two subclasses.
This makes e.g. dealing correctly with APPEND mode easier.

Alex
This commit is contained in:
Alex Neundorf
2012-09-28 21:47:37 +02:00
committed by Brad King
parent 190f2c8253
commit 0cfd055acd
6 changed files with 124 additions and 98 deletions
+7 -9
View File
@@ -84,15 +84,13 @@ protected:
const char* config,
std::string const& suffix) = 0;
/** Each subclass knows how to complain about a target that is
missing from an export set. */
virtual void ComplainAboutMissingTarget(cmTarget* depender,
cmTarget* dependee,
int occurrences) = 0;
std::vector<std::string> FindNamespaces(cmMakefile* mf,
const std::string& name);
/** Each subclass knows how to deal with a target that is missing from an
* export set. */
virtual void HandleMissingTarget(std::string& link_libs,
std::vector<std::string>& missingTargets,
cmMakefile* mf,
cmTarget* depender,
cmTarget* dependee) = 0;
// The namespace in which the exports are placed in the generated file.
std::string Namespace;