summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-03-14 14:38:19 (GMT)
committerBrad King <brad.king@kitware.com>2016-03-16 13:03:26 (GMT)
commit3144857e1eed83e038699942568869bfce461d4d (patch)
tree308a88383bed0e65d0bae865ed84e8d1fdd5f092 /Source/cmake.cxx
parenta87253154e15da3f05ec7a4c625caaa0c54a3861 (diff)
downloadCMake-3144857e1eed83e038699942568869bfce461d4d.zip
CMake-3144857e1eed83e038699942568869bfce461d4d.tar.gz
CMake-3144857e1eed83e038699942568869bfce461d4d.tar.bz2
Avoid depending on CMAKE_ROOT cache entry internally (#16015)
Use cmSystemTools::GetCMakeRoot() which always knows the location of our resources. Do not depend on CMAKE_ROOT because the user could unset it from the cache.
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 74364f7..dcc95af 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -2409,8 +2409,7 @@ int cmake::GetSystemInformation(std::vector<std::string>& args)
// we have to find the module directory, so we can copy the files
this->AddCMakePaths();
- std::string modulesPath =
- this->State->GetInitializedCacheValue("CMAKE_ROOT");
+ std::string modulesPath = cmSystemTools::GetCMakeRoot();
modulesPath += "/Modules";
std::string inFile = modulesPath;
inFile += "/SystemInformation.cmake";