summaryrefslogtreecommitdiffstats
path: root/Help/policy/CMP0137.rst
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-05-16 14:16:34 (GMT)
committerBrad King <brad.king@kitware.com>2022-05-16 14:47:21 (GMT)
commita6562ff57908e6f03ef44eb0438ba9937f28174c (patch)
tree66891e45efadaa7589705021e66d96a476088e82 /Help/policy/CMP0137.rst
parent4843a376767c2c4b46e29ed85ac823443317ca40 (diff)
downloadCMake-a6562ff57908e6f03ef44eb0438ba9937f28174c.zip
CMake-a6562ff57908e6f03ef44eb0438ba9937f28174c.tar.gz
CMake-a6562ff57908e6f03ef44eb0438ba9937f28174c.tar.bz2
try_compile: Add option to skip passing platform variables
Add a `CMAKE_TRY_COMPILE_NO_PLATFORM_VARIABLES` variable to tell `try_compile` not to pass platform variables to the test project. Issue: #23219
Diffstat (limited to 'Help/policy/CMP0137.rst')
-rw-r--r--Help/policy/CMP0137.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/Help/policy/CMP0137.rst b/Help/policy/CMP0137.rst
index 2efb906..ba3cb9c 100644
--- a/Help/policy/CMP0137.rst
+++ b/Help/policy/CMP0137.rst
@@ -21,6 +21,10 @@ the :ref:`whole-project <Try Compiling Whole Projects>` signature.
The ``NEW`` behavior for this policy is to pass the same variables that the
:ref:`source file <Try Compiling Source Files>` signature does.
+Regardless of the policy setting, the
+:variable:`CMAKE_TRY_COMPILE_NO_PLATFORM_VARIABLES` variable may be set
+to suppress passing the platform variables through either signature.
+
This policy was introduced in CMake version 3.24. Use the
:command:`cmake_policy` command to set this policy to ``OLD`` or ``NEW``
explicitly. Unlike many policies, CMake version |release| does *not* warn