mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
export: Add policy CMP0024 to disallow include() of export files
Currently, export() is executed at configure-time. One problem with this is that certain exported properties like the link interface may not be complete at the point the export() is encountered leading to an incorrect or incomplete exported representation. Additionally, the generated IMPORTED_LOCATION property may even be incorrect if commands following the export() have an effect on it. Another problem is that it requires the C++ implementation of cmake to be capable of computing the exported information at configure time. This is a limitation on the cleanup and maintenance of the code. At some point in the future, this limitation will be dropped and more implementation will be moved from cmTarget to cmGeneratorTarget.
This commit is contained in:
@@ -170,6 +170,8 @@ bool cmExportCommand
|
||||
ebfg.SetCommand(this);
|
||||
ebfg.SetExportOld(this->ExportOld.IsEnabled());
|
||||
|
||||
this->Makefile->AddExportedTargetsFile(fname);
|
||||
|
||||
// Compute the set of configurations exported.
|
||||
std::vector<std::string> configurationTypes;
|
||||
this->Makefile->GetConfigurations(configurationTypes);
|
||||
|
||||
Reference in New Issue
Block a user