summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-02-09 14:28:05 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-02-09 14:28:20 (GMT)
commite40cea3fe99dc79b1ce8bc8330f662ec3a36dc8e (patch)
tree444d13efd4e6a4844c57a209c4392102250a0969 /Source/cmMakefile.cxx
parent3d5466d5e95869380b38e40f8431a19e8a6d458e (diff)
parent2a6b0415d71db893b6d8edd1c5058d42eb40fca6 (diff)
downloadCMake-e40cea3fe99dc79b1ce8bc8330f662ec3a36dc8e.zip
CMake-e40cea3fe99dc79b1ce8bc8330f662ec3a36dc8e.tar.gz
CMake-e40cea3fe99dc79b1ce8bc8330f662ec3a36dc8e.tar.bz2
Merge topic 'genex-LINK_LIBRARY-to-decorate-library'
2a6b0415d7 $<LINK_LIBRARY>: Add LINK_LIBRARY_OVERRIDE target property 42965799b4 Genex: Add $<LINK_LIBRARY:...> 78dd7d5292 cmRulePlaceholderExpander: add base class for placeholder expansion reuse 4b55828a9f cmExpandListWithBacktrace: add handling of empty elements. 28d7432468 cmComputeLinkInformation: use cmComputeLinkDepends::LinkEntry Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6769
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx25
1 files changed, 25 insertions, 0 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 34d3efa..934a6f4 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -3978,6 +3978,31 @@ std::vector<std::string> cmMakefile::GetPropertyKeys() const
return this->StateSnapshot.GetDirectory().GetPropertyKeys();
}
+void cmMakefile::CheckProperty(const std::string& prop) const
+{
+ // Certain properties need checking.
+ if (prop == "LINK_LIBRARIES") {
+ if (cmValue value = this->GetProperty(prop)) {
+ // Look for <LINK_LIBRARY:> internal pattern
+ static cmsys::RegularExpression linkLibrary(
+ "(^|;)(</?LINK_LIBRARY:[^;>]*>)(;|$)");
+ if (!linkLibrary.find(value)) {
+ return;
+ }
+
+ // Report an error.
+ this->IssueMessage(
+ MessageType::FATAL_ERROR,
+ cmStrCat(
+ "Property ", prop, " contains the invalid item \"",
+ linkLibrary.match(2), "\". The ", prop,
+ " property may contain the generator-expression "
+ "\"$<LINK_LIBRARY:...>\" "
+ "which may be used to specify how the libraries are linked."));
+ }
+ }
+}
+
cmTarget* cmMakefile::FindLocalNonAliasTarget(const std::string& name) const
{
auto i = this->Targets.find(name);