diff options
author | Brad King <brad.king@kitware.com> | 2022-05-16 14:04:48 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-05-16 14:39:42 (GMT) |
commit | 4843a376767c2c4b46e29ed85ac823443317ca40 (patch) | |
tree | 0a957181b6b5e352e5793d2ff845b365fed50e59 /Source/cmPolicies.h | |
parent | 364fde65ee93588cb519ece09b161c0e8e826c3c (diff) | |
download | CMake-4843a376767c2c4b46e29ed85ac823443317ca40.zip CMake-4843a376767c2c4b46e29ed85ac823443317ca40.tar.gz CMake-4843a376767c2c4b46e29ed85ac823443317ca40.tar.bz2 |
try_compile: Propagate platform variables in project-mode too
Add policy CMP0137 to propagate both our builtin variables and those
listed by `CMAKE_TRY_COMPILE_PLATFORM_VARIABLES` to `try_compile`
whole-project builds.
Inspired-by: Alexander Neumann <Alexander.Neumann@hamburg.de>
Fixes: #23219
Diffstat (limited to 'Source/cmPolicies.h')
-rw-r--r-- | Source/cmPolicies.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h index 4977083..c8b037e 100644 --- a/Source/cmPolicies.h +++ b/Source/cmPolicies.h @@ -411,7 +411,10 @@ class cmMakefile; 3, 24, 0, cmPolicies::WARN) \ SELECT(POLICY, CMP0136, \ "Watcom runtime library flags are selected by an abstraction.", 3, \ - 24, 0, cmPolicies::WARN) + 24, 0, cmPolicies::WARN) \ + SELECT(POLICY, CMP0137, \ + "try_compile() passes platform variables in project mode", 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) \ |