summaryrefslogtreecommitdiffstats
path: root/Help/release
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2022-03-23 03:31:04 (GMT)
committerBrad King <brad.king@kitware.com>2022-03-29 13:42:59 (GMT)
commit05e510bf0bf8d730b03e8b389d088919825b4b5a (patch)
tree12fc8e73e25bf76f2e6b243ce4469dae64c84370 /Help/release
parent774a9eb210c09da97135cb733828752e627c96c7 (diff)
downloadCMake-05e510bf0bf8d730b03e8b389d088919825b4b5a.zip
CMake-05e510bf0bf8d730b03e8b389d088919825b4b5a.tar.gz
CMake-05e510bf0bf8d730b03e8b389d088919825b4b5a.tar.bz2
CMP0132: Don't set compiler environment variables on first run
When running CMake for the first time in a build tree, for some generators CMake would set compiler environment variables like CC, CXX, etc. when the corresponding language is enabled. That behavior was never documented and can result in different behavior between the first and subsequent runs. Add a policy to no longer set those environment variables. Fixes: #21378
Diffstat (limited to 'Help/release')
-rw-r--r--Help/release/dev/set-env-var-first-run.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/Help/release/dev/set-env-var-first-run.rst b/Help/release/dev/set-env-var-first-run.rst
new file mode 100644
index 0000000..c3f7d9f
--- /dev/null
+++ b/Help/release/dev/set-env-var-first-run.rst
@@ -0,0 +1,6 @@
+set-env-var-first-run
+---------------------
+
+* CMake no longer sets environment variables like :envvar:`CC`, :envvar:`CXX`,
+ etc. when enabling the corresponding language during the first CMake run in
+ a build directory. See policy :policy:`CMP0132`.