exports: first try at error handling if a target is missing

Now, if an imported target depends on a library which must come
from some other export set, cmake generates a check which errors
out if that target does not exist. I guess instead of completely
erroring out it would be better to only make the find_package() fail.

Alex
This commit is contained in:
Alex Neundorf
2012-09-15 22:38:30 +02:00
committed by Brad King
parent 87f4c01910
commit 8b5f448ba6
4 changed files with 42 additions and 11 deletions
+6 -2
View File
@@ -60,17 +60,21 @@ protected:
ImportPropertyMap const& properties,
const std::set<std::string>& importedLocations);
void GenerateImportedFileCheckLoop(std::ostream& os);
void GenerateMissingTargetsCheckCode(std::ostream& os,
const std::vector<std::string>& missingTargets);
// Collect properties with detailed information about targets beyond
// their location on disk.
void SetImportDetailProperties(const char* config,
std::string const& suffix, cmTarget* target,
ImportPropertyMap& properties);
ImportPropertyMap& properties,
std::vector<std::string>& missingTargets);
void SetImportLinkProperty(std::string const& suffix,
cmTarget* target, const char* propName,
std::vector<std::string> const& libs,
ImportPropertyMap& properties);
ImportPropertyMap& properties,
std::vector<std::string>& missingTargets);
/** Each subclass knows how to generate its kind of export file. */
virtual bool GenerateMainFile(std::ostream& os) = 0;