summaryrefslogtreecommitdiffstats
path: root/Help/command/try_compile.rst
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-05-16 14:04:48 (GMT)
committerBrad King <brad.king@kitware.com>2022-05-16 14:39:42 (GMT)
commit4843a376767c2c4b46e29ed85ac823443317ca40 (patch)
tree0a957181b6b5e352e5793d2ff845b365fed50e59 /Help/command/try_compile.rst
parent364fde65ee93588cb519ece09b161c0e8e826c3c (diff)
downloadCMake-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 'Help/command/try_compile.rst')
-rw-r--r--Help/command/try_compile.rst11
1 files changed, 11 insertions, 0 deletions
diff --git a/Help/command/try_compile.rst b/Help/command/try_compile.rst
index 4b2a631..06b2362 100644
--- a/Help/command/try_compile.rst
+++ b/Help/command/try_compile.rst
@@ -7,6 +7,8 @@ try_compile
Try building some code.
+.. _`Try Compiling Whole Projects`:
+
Try Compiling Whole Projects
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -25,6 +27,15 @@ will not be deleted after this command is run. Specify ``<targetName>`` to
build a specific target instead of the ``all`` or ``ALL_BUILD`` target. See
below for the meaning of other options.
+.. versionchanged:: 3.24
+ CMake variables describing platform settings, and those listed by the
+ :variable:`CMAKE_TRY_COMPILE_PLATFORM_VARIABLES` variable, are propagated
+ into the project's build configuration. See policy :policy:`CMP0137`.
+ Previously this was only done by the
+ :ref:`source file <Try Compiling Source Files>` signature.
+
+.. _`Try Compiling Source Files`:
+
Try Compiling Source Files
^^^^^^^^^^^^^^^^^^^^^^^^^^