diff options
author | Brad King <brad.king@kitware.com> | 2016-03-14 10:38:19 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-03-16 09:03:26 -0400 |
commit | 3144857e1eed83e038699942568869bfce461d4d (patch) | |
tree | 308a88383bed0e65d0bae865ed84e8d1fdd5f092 /Source/cmGlobalVisualStudioGenerator.cxx | |
parent | a87253154e15da3f05ec7a4c625caaa0c54a3861 (diff) | |
download | cmake-3144857e1eed83e038699942568869bfce461d4d.tar.gz |
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/cmGlobalVisualStudioGenerator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudioGenerator.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index 6a1aa2958a..00bb511c4b 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -184,12 +184,11 @@ void RegisterVisualStudioMacros(const std::string& macrosFile, //---------------------------------------------------------------------------- void cmGlobalVisualStudioGenerator::ConfigureCMakeVisualStudioMacros() { - cmMakefile* mf = this->LocalGenerators[0]->GetMakefile(); std::string dir = this->GetUserMacrosDirectory(); if (dir != "") { - std::string src = mf->GetRequiredDefinition("CMAKE_ROOT"); + std::string src = cmSystemTools::GetCMakeRoot(); src += "/Templates/" CMAKE_VSMACROS_FILENAME; std::string dst = dir + "/CMakeMacros/" CMAKE_VSMACROS_FILENAME; |