summaryrefslogtreecommitdiffstats
path: root/Source/cmPolicies.h
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2024-03-30 03:48:50 (GMT)
committerCraig Scott <craig.scott@crascit.com>2024-04-02 12:00:38 (GMT)
commit97464aa9701cc4bebb6d0a44c0201c3476489c3e (patch)
tree5fbbc4104613762d7903702b40b68e18d8c77443 /Source/cmPolicies.h
parentd166e7d740bfb53c18221f1126e984b668923208 (diff)
downloadCMake-97464aa9701cc4bebb6d0a44c0201c3476489c3e.zip
CMake-97464aa9701cc4bebb6d0a44c0201c3476489c3e.tar.gz
CMake-97464aa9701cc4bebb6d0a44c0201c3476489c3e.tar.bz2
enable_language(): Fail if called before project()
Fixes: #25550
Diffstat (limited to 'Source/cmPolicies.h')
-rw-r--r--Source/cmPolicies.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h
index e526dce..b0237d7 100644
--- a/Source/cmPolicies.h
+++ b/Source/cmPolicies.h
@@ -505,7 +505,10 @@ class cmMakefile;
SELECT(POLICY, CMP0164, \
"add_library() rejects SHARED libraries when not supported by the " \
"platform.", \
- 3, 30, 0, cmPolicies::WARN)
+ 3, 30, 0, cmPolicies::WARN) \
+ SELECT(POLICY, CMP0165, \
+ "enable_language() must not be called before project().", 3, 30, 0, \
+ cmPolicies::WARN)
#define CM_SELECT_ID(F, A1, A2, A3, A4, A5, A6) F(A1)
#define CM_FOR_EACH_POLICY_ID(POLICY) \