mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
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:
@@ -72,8 +72,9 @@ cmExportBuildFileGenerator
|
||||
if(!properties.empty())
|
||||
{
|
||||
// Get the rest of the target details.
|
||||
std::vector<std::string> missingTargets;
|
||||
this->SetImportDetailProperties(config, suffix,
|
||||
target, properties);
|
||||
target, properties, missingTargets);
|
||||
|
||||
// TOOD: PUBLIC_HEADER_LOCATION
|
||||
// This should wait until the build feature propagation stuff
|
||||
@@ -82,6 +83,7 @@ cmExportBuildFileGenerator
|
||||
// properties);
|
||||
|
||||
// Generate code in the export file.
|
||||
this->GenerateMissingTargetsCheckCode(os, missingTargets);
|
||||
this->GenerateImportPropertyCode(os, config, target, properties);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user