summaryrefslogtreecommitdiffstats
path: root/Modules/Platform
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2020-05-20 10:27:47 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-05-20 10:28:11 (GMT)
commitddcc5a350ca81cdbe2942b16b618d8c1d2e0c335 (patch)
tree316bb8d309559be4df7883b3ae1f6c47e308ec5d /Modules/Platform
parentc8fdc54a3bb52154a2622b97051091ed10679c18 (diff)
parent6b3d8f281e02dbd8e1035403e43c25179bd2276c (diff)
downloadCMake-ddcc5a350ca81cdbe2942b16b618d8c1d2e0c335.zip
CMake-ddcc5a350ca81cdbe2942b16b618d8c1d2e0c335.tar.gz
CMake-ddcc5a350ca81cdbe2942b16b618d8c1d2e0c335.tar.bz2
Merge topic 'doc-CMAKE_SYSTEM_PREFIX_PATH'
6b3d8f281e Document which environment variables effect CMAKE_SYSTEM_PREFIX_PATH Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4748
Diffstat (limited to 'Modules/Platform')
-rw-r--r--Modules/Platform/UnixPaths.cmake7
-rw-r--r--Modules/Platform/WindowsPaths.cmake4
2 files changed, 11 insertions, 0 deletions
diff --git a/Modules/Platform/UnixPaths.cmake b/Modules/Platform/UnixPaths.cmake
index 98c83aa..7fe64cb 100644
--- a/Modules/Platform/UnixPaths.cmake
+++ b/Modules/Platform/UnixPaths.cmake
@@ -21,6 +21,10 @@ get_filename_component(_CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" PATH)
# List common installation prefixes. These will be used for all
# search types.
+#
+# Reminder when adding new locations computed from environment variables
+# please make sure to keep Help/variable/CMAKE_SYSTEM_PREFIX_PATH.rst
+# synchronized
list(APPEND CMAKE_SYSTEM_PREFIX_PATH
# Standard
/usr/local /usr /
@@ -86,6 +90,9 @@ set(_CMAKE_CUDA_IMPLICIT_INCLUDE_DIRECTORIES_INIT
unset(_cmake_sysroot_compile)
+# Reminder when adding new locations computed from environment variables
+# please make sure to keep Help/variable/CMAKE_SYSTEM_PREFIX_PATH.rst
+# synchronized
if(CMAKE_COMPILER_SYSROOT)
list(PREPEND CMAKE_SYSTEM_PREFIX_PATH "${CMAKE_COMPILER_SYSROOT}")
endif()
diff --git a/Modules/Platform/WindowsPaths.cmake b/Modules/Platform/WindowsPaths.cmake
index 71cc609..b9e2f17 100644
--- a/Modules/Platform/WindowsPaths.cmake
+++ b/Modules/Platform/WindowsPaths.cmake
@@ -24,6 +24,10 @@ set(__WINDOWS_PATHS_INCLUDED 1)
# ENV{ProgramFiles(x86)} = [C:\Program Files (x86)]
# ENV{ProgramFiles} = [C:\Program Files (x86)]
# ENV{ProgramW6432} = [C:\Program Files]
+#
+# Reminder when adding new locations computed from environment variables
+# please make sure to keep Help/variable/CMAKE_SYSTEM_PREFIX_PATH.rst
+# synchronized
set(_programfiles "")
foreach(v "ProgramW6432" "ProgramFiles" "ProgramFiles(x86)")
if(DEFINED "ENV{${v}}")