summaryrefslogtreecommitdiffstats
path: root/Help/variable
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-05-17 12:57:48 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-05-17 12:57:55 (GMT)
commita7cd15a61c5708ba50482ee485b4c102146861d0 (patch)
treed55e53a1b1085ed39f251fbf804a72c7fd2b09a8 /Help/variable
parent20ed6f697e997f597b1e60d16edf711792e94965 (diff)
parenta6562ff57908e6f03ef44eb0438ba9937f28174c (diff)
downloadCMake-a7cd15a61c5708ba50482ee485b4c102146861d0.zip
CMake-a7cd15a61c5708ba50482ee485b4c102146861d0.tar.gz
CMake-a7cd15a61c5708ba50482ee485b4c102146861d0.tar.bz2
Merge topic 'try_compile-project-platform-vars'
a6562ff579 try_compile: Add option to skip passing platform variables 4843a37676 try_compile: Propagate platform variables in project-mode too Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !7265
Diffstat (limited to 'Help/variable')
-rw-r--r--Help/variable/CMAKE_TRY_COMPILE_NO_PLATFORM_VARIABLES.rst10
-rw-r--r--Help/variable/CMAKE_TRY_COMPILE_PLATFORM_VARIABLES.rst9
2 files changed, 19 insertions, 0 deletions
diff --git a/Help/variable/CMAKE_TRY_COMPILE_NO_PLATFORM_VARIABLES.rst b/Help/variable/CMAKE_TRY_COMPILE_NO_PLATFORM_VARIABLES.rst
new file mode 100644
index 0000000..944caa5
--- /dev/null
+++ b/Help/variable/CMAKE_TRY_COMPILE_NO_PLATFORM_VARIABLES.rst
@@ -0,0 +1,10 @@
+CMAKE_TRY_COMPILE_NO_PLATFORM_VARIABLES
+---------------------------------------
+
+Set to a true value to tell the :command:`try_compile` command not
+to propagate any platform variables into the test project.
+
+The :command:`try_compile` command normally passes some CMake variables
+that configure the platform and toolchain behavior into test projects.
+See policy :policy:`CMP0137`. This variable may be set to disable
+that behavior.
diff --git a/Help/variable/CMAKE_TRY_COMPILE_PLATFORM_VARIABLES.rst b/Help/variable/CMAKE_TRY_COMPILE_PLATFORM_VARIABLES.rst
index d178513..6b26d14 100644
--- a/Help/variable/CMAKE_TRY_COMPILE_PLATFORM_VARIABLES.rst
+++ b/Help/variable/CMAKE_TRY_COMPILE_PLATFORM_VARIABLES.rst
@@ -26,3 +26,12 @@ If a user passes ``-DMY_CUSTOM_VARIABLE=SomeValue`` to CMake then this
setting will be made visible to the toolchain file both for the main
project and for test projects generated by the :command:`try_compile`
command source file signature.
+
+.. versionchanged:: 3.24
+ Listed variables are propagated to the :command:`try_compile`
+ :ref:`whole-project <Try Compiling Whole Projects>` signature too.
+ See :policy:`CMP0137`.
+
+.. versionadded:: 3.24
+ The :variable:`CMAKE_TRY_COMPILE_NO_PLATFORM_VARIABLES` variable may be
+ set to disable passing platform variables into the test project.