summaryrefslogtreecommitdiffstats
path: root/Source/cmPolicies.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-03-22 15:09:23 (GMT)
committerBrad King <brad.king@kitware.com>2022-03-24 12:23:55 (GMT)
commitcf312a2e5423c49cc5da446f5407a6f4a596a3cb (patch)
tree3bde9691ad13e40b06744b63a2c53dda75cbdf2a /Source/cmPolicies.h
parent41a6b4a53ba844ef986b0bc4efe8938b97eea810 (diff)
downloadCMake-cf312a2e5423c49cc5da446f5407a6f4a596a3cb.zip
CMake-cf312a2e5423c49cc5da446f5407a6f4a596a3cb.tar.gz
CMake-cf312a2e5423c49cc5da446f5407a6f4a596a3cb.tar.bz2
LINK_LIBRARIES: Add support for LINK_ONLY genex
Previously we always used content guarded by `$<LINK_ONLY:...>` in `LINK_LIBRARIES`, even when evaluating for non-linking usage requirements. Add a policy to honor `LINK_ONLY` in `LINK_LIBRARIES` the same way we already do in `INTERFACE_LINK_LIBRARIES`.
Diffstat (limited to 'Source/cmPolicies.h')
-rw-r--r--Source/cmPolicies.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h
index 7d4012d..3b9d067 100644
--- a/Source/cmPolicies.h
+++ b/Source/cmPolicies.h
@@ -390,7 +390,10 @@ class cmMakefile;
"Compiler id for MCST LCC compilers is now LCC, not GNU.", 3, 23, 0, \
cmPolicies::WARN) \
SELECT(POLICY, CMP0130, "while() diagnoses condition evaluation errors.", \
- 3, 24, 0, cmPolicies::WARN)
+ 3, 24, 0, cmPolicies::WARN) \
+ SELECT(POLICY, CMP0131, \
+ "LINK_LIBRARIES supports the LINK_ONLY generator expression.", 3, \
+ 24, 0, cmPolicies::WARN)
#define CM_SELECT_ID(F, A1, A2, A3, A4, A5, A6) F(A1)
#define CM_FOR_EACH_POLICY_ID(POLICY) \
@@ -426,7 +429,8 @@ class cmMakefile;
F(CMP0108) \
F(CMP0112) \
F(CMP0113) \
- F(CMP0119)
+ F(CMP0119) \
+ F(CMP0131)
/** \class cmPolicies
* \brief Handles changes in CMake behavior and policies