diff options
author | Joseph Snyder <joe.snyder@kitware.com> | 2019-11-19 14:04:40 -0500 |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2020-01-02 17:11:31 -0500 |
commit | c621839bd9e17974c476e7332fc267ccaa351a8e (patch) | |
tree | b043f29e1cfc20e44ddd6f0cc0328c09f30bd961 /Source/cmExportFileGenerator.cxx | |
parent | 10fea25139cc302ef0f0a41aa68b44cda72a4fd2 (diff) | |
download | cmake-c621839bd9e17974c476e7332fc267ccaa351a8e.tar.gz |
Add set_property option: DEPRECATION
Add a new property flag for a target which contains a message regarding
deprecation status.
Add a warning at "Generate" time if a linked target is marked as
deprecated.
Expand ExportImport test to ensure that new property is being set and
passed correctly. Ensure that the message is shown during the
"Generate" step run of the ExportImport test.
Diffstat (limited to 'Source/cmExportFileGenerator.cxx')
-rw-r--r-- | Source/cmExportFileGenerator.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index aeef602bf6..7a4b8875cd 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -1062,6 +1062,12 @@ void cmExportFileGenerator::GenerateImportTargetCode( if (target->IsCFBundleOnApple()) { os << "set_property(TARGET " << targetName << " PROPERTY BUNDLE 1)\n"; } + + // generate DEPRECATION + if (target->IsDeprecated()) { + os << "set_property(TARGET " << targetName << " PROPERTY DEPRECATION " + << cmExportFileGeneratorEscape(target->GetDeprecation()) << ")\n"; + } os << "\n"; } |